Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Functions | Variables
tesseract_support_unit.cpp File Reference
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <iostream>
#include <fstream>
#include <tesseract_support/tesseract_support_resource_locator.h>
#include <tesseract_common/types.h>
#include <tesseract_common/unit_test_utils.h>
Include dependency graph for tesseract_support_unit.cpp:

Functions

tesseract_common::fs::path file_path (INSTALL_LOCATION)
 
 EXPECT_TRUE (resource !=nullptr)
 
 EXPECT_TRUE (resource->isFile())
 
 EXPECT_EQ (resource->getUrl(), "package://tesseract_support/urdf/abb_irb2400.urdf")
 
 EXPECT_EQ (tesseract_common::fs::path(resource->getFilePath()),(package_path/"urdf/abb_irb2400.urdf"))
 
 EXPECT_FALSE (resource->getResourceContents().empty())
 
 EXPECT_TRUE (resource->getResourceContentStream() !=nullptr)
 
 EXPECT_TRUE (sub_resource !=nullptr)
 
 EXPECT_TRUE (sub_resource->isFile())
 
 EXPECT_EQ (sub_resource->getUrl(), "package://tesseract_support/urdf/boxbot.urdf")
 
 EXPECT_EQ (tesseract_common::fs::path(sub_resource->getFilePath()),(package_path/"urdf/boxbot.urdf"))
 
 EXPECT_FALSE (sub_resource->getResourceContents().empty())
 
 EXPECT_TRUE (sub_resource->getResourceContentStream() !=nullptr)
 
 EXPECT_TRUE (resource_empty==nullptr)
 
 EXPECT_TRUE (resource_does_not_exist !=nullptr)
 
 EXPECT_TRUE (resource_does_not_exist->getResourceContents().empty())
 
 EXPECT_TRUE (resource_does_not_exist->getResourceContentStream()==nullptr)
 
int main (int argc, char **argv)
 

Variables

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
 
tesseract_common::fs::path package_path = file_path / "share/tesseract_support"
 
ResourceLocator::Ptr locator = std::make_shared<TesseractSupportResourceLocator>()
 
Resource::Ptr resource = locator->locateResource("package://tesseract_support/urdf/abb_irb2400.urdf")
 
Resource::Ptr sub_resource = resource->locateResource("boxbot.urdf")
 
tesseract_common::Resource::Ptr resource_empty = locator->locateResource("")
 
tesseract_common::Resource::Ptr resource_does_not_exist
 

Function Documentation

◆ EXPECT_EQ() [1/4]

EXPECT_EQ ( resource->  getUrl(),
"package://tesseract_support/urdf/abb_irb2400.urdf"   
)

◆ EXPECT_EQ() [2/4]

EXPECT_EQ ( sub_resource->  getUrl(),
"package://tesseract_support/urdf/boxbot.urdf"   
)

◆ EXPECT_EQ() [3/4]

EXPECT_EQ ( tesseract_common::fs::path(resource->getFilePath())  ,
(package_path/"urdf/abb_irb2400.urdf")   
)

◆ EXPECT_EQ() [4/4]

EXPECT_EQ ( tesseract_common::fs::path(sub_resource->getFilePath())  ,
(package_path/"urdf/boxbot.urdf")   
)

◆ EXPECT_FALSE() [1/2]

EXPECT_FALSE ( resource->  getResourceContents).empty()

◆ EXPECT_FALSE() [2/2]

EXPECT_FALSE ( sub_resource->  getResourceContents).empty()

◆ EXPECT_TRUE() [1/10]

EXPECT_TRUE ( resource = nullptr)

◆ EXPECT_TRUE() [2/10]

EXPECT_TRUE ( resource->getResourceContentStream() !  = nullptr)

◆ EXPECT_TRUE() [3/10]

EXPECT_TRUE ( resource->  isFile())

◆ EXPECT_TRUE() [4/10]

EXPECT_TRUE ( resource_does_not_exist = nullptr)

◆ EXPECT_TRUE() [5/10]

EXPECT_TRUE ( resource_does_not_exist->  getResourceContents).empty()

◆ EXPECT_TRUE() [6/10]

EXPECT_TRUE ( resource_does_not_exist->  getResourceContentStream() = =nullptr)

◆ EXPECT_TRUE() [7/10]

EXPECT_TRUE ( resource_empty  = =nullptr)

◆ EXPECT_TRUE() [8/10]

EXPECT_TRUE ( sub_resource = nullptr)

◆ EXPECT_TRUE() [9/10]

EXPECT_TRUE ( sub_resource->getResourceContentStream() !  = nullptr)

◆ EXPECT_TRUE() [10/10]

EXPECT_TRUE ( sub_resource->  isFile())

◆ file_path()

tesseract_common::fs::path file_path ( INSTALL_LOCATION  )

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ locator

ResourceLocator::Ptr locator = std::make_shared<TesseractSupportResourceLocator>()

◆ package_path

tesseract_common::fs::path package_path = file_path / "share/tesseract_support"

◆ resource

Resource::Ptr resource = locator->locateResource("package://tesseract_support/urdf/abb_irb2400.urdf")

◆ resource_does_not_exist

tesseract_common::Resource::Ptr resource_does_not_exist
Initial value:
= locator->locateResource("package://tesseract_support/urdf/"
"does_not_exist.urdf")
ResourceLocator::Ptr locator
Definition: tesseract_support_unit.cpp:18

◆ resource_empty

tesseract_common::Resource::Ptr resource_empty = locator->locateResource("")

◆ sub_resource

Resource::Ptr sub_resource = resource->locateResource("boxbot.urdf")

◆ TESSERACT_COMMON_IGNORE_WARNINGS_POP

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
Initial value:
{
using namespace tesseract_common
Definition: allowed_collision_matrix.h:16