Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
b
c
d
g
i
j
l
m
n
o
p
s
t
v
w
Functions
m
n
p
t
w
Variables
Files
File List
File Members
All
f
g
m
r
s
t
w
Functions
f
g
m
r
s
t
w
Variables
test
tesseract_urdf_utils_unit.cpp
Go to the documentation of this file.
1
#include <
tesseract_common/macros.h
>
2
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
3
#include <gtest/gtest.h>
4
#include <Eigen/Geometry>
5
TESSERACT_COMMON_IGNORE_WARNINGS_POP
6
7
#include <
tesseract_urdf/utils.h
>
8
#include "
tesseract_urdf_common_unit.h
"
9
10
TEST
(TesseractURDFUnit,
trailingSlash
)
// NOLINT
11
{
12
{
13
std::string str =
"/tmp"
;
14
EXPECT_EQ
(
tesseract_urdf::trailingSlash
(str),
"/tmp/"
);
15
}
16
17
{
18
std::string str =
"/tmp/"
;
19
EXPECT_EQ
(
tesseract_urdf::trailingSlash
(str),
"/tmp/"
);
20
}
21
22
{
23
std::string str;
24
EXPECT_EQ
(
tesseract_urdf::trailingSlash
(str),
"/"
);
25
}
26
}
27
28
TEST
(TesseractURDFUnit,
noTrailingSlash
)
// NOLINT
29
{
30
{
31
std::string str =
"/tmp"
;
32
EXPECT_EQ
(
tesseract_urdf::noTrailingSlash
(str),
"/tmp"
);
33
}
34
35
{
36
std::string str =
"/tmp/"
;
37
EXPECT_EQ
(
tesseract_urdf::noTrailingSlash
(str),
"/tmp"
);
38
}
39
40
{
41
std::string str;
42
EXPECT_EQ
(
tesseract_urdf::noTrailingSlash
(str),
""
);
43
}
44
45
{
46
std::string str =
"/tmp//"
;
47
EXPECT_EQ
(
tesseract_urdf::noTrailingSlash
(str),
"/tmp"
);
48
}
49
}
50
51
TEST
(TesseractURDFUnit,
noLeadingSlash
)
// NOLINT
52
{
53
{
54
std::string str =
"/tmp"
;
55
EXPECT_EQ
(
tesseract_urdf::noLeadingSlash
(str),
"tmp"
);
56
}
57
58
{
59
std::string str =
"/tmp/"
;
60
EXPECT_EQ
(
tesseract_urdf::noLeadingSlash
(str),
"tmp/"
);
61
}
62
63
{
64
std::string str =
"//tmp/"
;
65
EXPECT_EQ
(
tesseract_urdf::noLeadingSlash
(str),
"tmp/"
);
66
}
67
68
{
69
std::string str;
70
EXPECT_EQ
(
tesseract_urdf::noLeadingSlash
(str),
""
);
71
}
72
}
tesseract_urdf::trailingSlash
std::string trailingSlash(const std::string &path)
Definition:
utils.cpp:20
tesseract_urdf::noTrailingSlash
std::string noTrailingSlash(const std::string &path)
Definition:
utils.cpp:35
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
utils.h
tesseract_urdf_common_unit.h
TESSERACT_COMMON_IGNORE_WARNINGS_POP
TEST
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP TEST(TesseractURDFUnit, trailingSlash)
Definition:
tesseract_urdf_utils_unit.cpp:10
macros.h
tesseract_urdf::noLeadingSlash
std::string noLeadingSlash(const std::string &filename)
Definition:
utils.cpp:45
EXPECT_EQ
#define EXPECT_EQ(a, b)
tesseract_urdf
Author(s): Levi Armstrong
autogenerated on Thu Apr 24 2025 03:10:44