Skip to content

Commit 21a3d9b

Browse files
HansOerstedpre-commit-ci[bot]youtalk
authored
feat: add the lanelet length test (#39)
* lanelet length test added. Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * style(pre-commit): autofix * compare the precise values Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> --------- Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent a32312e commit 21a3d9b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

autoware_lanelet2_extension/test/src/test_utilities.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,15 @@ TEST_F(TestSuite, OverwriteLaneletsCenterline) // NOLINT for gtest
159159
}
160160
}
161161

162+
TEST_F(TestSuite, GetLaneletLength) // NOLINT for gtest
163+
{
164+
double length_2d = lanelet::utils::getLaneletLength2d(road_lanelet);
165+
double length_3d = lanelet::utils::getLaneletLength3d(road_lanelet);
166+
167+
EXPECT_DOUBLE_EQ(length_2d, 1.0);
168+
EXPECT_DOUBLE_EQ(length_3d, 1.0);
169+
}
170+
162171
/*
163172
TEST(Utilities, copyZ) // NOLINT for gtest
164173
{

0 commit comments

Comments
 (0)