From c68bcca3f3755f44e5fe543dea59fdfb607550c7 Mon Sep 17 00:00:00 2001 From: Andreas Salzburger Date: Thu, 5 Dec 2024 11:52:54 +0100 Subject: [PATCH] Update Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../Core/Visualization/Interpolation3DTests.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp b/Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp index bbac6043f1e..cc50385cf15 100644 --- a/Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp +++ b/Tests/UnitTests/Core/Visualization/Interpolation3DTests.cpp @@ -73,6 +73,20 @@ BOOST_AUTO_TEST_CASE(SplineInterpolationArray) { BOOST_CHECK_EQUAL(trajectory.size(), 108); } +BOOST_AUTO_TEST_CASE(SplineInterpolationErrors) { + std::vector> 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