Skip to content

Commit

Permalink
Update Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
asalzburger and coderabbitai[bot] authored Dec 5, 2024
1 parent 13e263f commit c68bcca
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ BOOST_AUTO_TEST_CASE(SplineInterpolationArray) {
BOOST_CHECK_EQUAL(trajectory.size(), 108);
}

BOOST_AUTO_TEST_CASE(SplineInterpolationErrors) {
std::vector<std::array<double, 3u>> inputs;

// Test with single point
inputs.push_back({0., 0., 0.});
auto result = Acts::Interpolation3D::spline(inputs, 10);
BOOST_CHECK_EQUAL(result.size(), 1);

// Test with two points
inputs.push_back({1., 1., 1.});
result = Acts::Interpolation3D::spline(inputs, 10);
BOOST_CHECK_EQUAL(result.size(), 2);
}

BOOST_AUTO_TEST_SUITE_END()

} // namespace Acts::Test

0 comments on commit c68bcca

Please sign in to comment.