24 CPPUNIT_TEST_SUITE(mitkPhotoacousticVesselMeanderStrategyTestSuite);
25 MITK_TEST(TestCalculateNewPositionInStraightLine);
27 CPPUNIT_TEST_SUITE_END();
30 mitk::pa::VesselMeanderStrategy::Pointer m_TestStrategy;
31 mitk::pa::Vector::Pointer m_TestDirection;
41 void TestCalculateNewPositionInStraightLine()
47 for (
int i = -2; i <= 2; i++)
54 for (
int j = -2; j <= 2; j++)
61 m_TestDirection->SetElement(0, d*j);
62 m_TestDirection->SetElement(1, e*j);
63 m_TestDirection->SetElement(2, f*j);
65 mitk::pa::Vector::Pointer directionBefore = m_TestDirection->Clone();
66 m_TestStrategy->CalculateNewDirectionVectorInStraightLine(m_TestDirection, 0,
nullptr);
67 CPPUNIT_ASSERT(
mitk::pa::Equal(directionBefore, m_TestDirection, 1e-6,
false));
72 void tearDown()
override 74 m_TestStrategy =
nullptr;
75 m_TestDirection =
nullptr;
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
MITKPHOTOACOUSTICSLIB_EXPORT bool Equal(const MonteCarloThreadHandler::Pointer leftHandSide, const MonteCarloThreadHandler::Pointer rightHandSide, double eps, bool verbose)
Equal A function comparing two thread handlers for beeing equal.
Test fixture for parameterized tests.