Skip to content

Commit

Permalink
feat: add the lanelet length test (#39)
Browse files Browse the repository at this point in the history
* lanelet length test added.

Signed-off-by: Zhe Shen <[email protected]>

* style(pre-commit): autofix

* compare the precise values

Signed-off-by: Zhe Shen <[email protected]>

---------

Signed-off-by: Zhe Shen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yutaka Kondo <[email protected]>
  • Loading branch information
3 people authored Jan 6, 2025
1 parent a32312e commit 21a3d9b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions autoware_lanelet2_extension/test/src/test_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ TEST_F(TestSuite, OverwriteLaneletsCenterline) // NOLINT for gtest
}
}

TEST_F(TestSuite, GetLaneletLength) // NOLINT for gtest
{
double length_2d = lanelet::utils::getLaneletLength2d(road_lanelet);
double length_3d = lanelet::utils::getLaneletLength3d(road_lanelet);

EXPECT_DOUBLE_EQ(length_2d, 1.0);
EXPECT_DOUBLE_EQ(length_3d, 1.0);
}

/*
TEST(Utilities, copyZ) // NOLINT for gtest
{
Expand Down

0 comments on commit 21a3d9b

Please sign in to comment.