Skip to content

Commit

Permalink
Adding unit testing for BezierEthz
Browse files Browse the repository at this point in the history
  • Loading branch information
lucsch committed Jul 8, 2024
1 parent e47bd18 commit d734ce1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/src/test_bezierethz.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "gtest/gtest.h"
#include "../../src/core/bezierethz.h"

TEST(BezierEthzTest, ConstructorTest) {
// Test the constructor of BezierEthz
BezierEthz bezierEthz(5.0, 10);
ASSERT_EQ(bezierEthz.GetPointListRef()->GetCount(), 0);
}

TEST(BezierEthzTest, InitTest) {
// Test the Init method of BezierEthz
BezierEthz bezierEthz(5.0, 10);
wxRealPoint P1(1.0, 1.0);
wxRealPoint P2(2.0, 2.0);
wxRealPoint P3(3.0, 3.0);
wxRealPoint P4(4.0, 4.0);
bezierEthz.Init(P1, P2, P3, P4);
ASSERT_EQ(bezierEthz.GetPointListRef()->GetCount(), 3);
}

0 comments on commit d734ce1

Please sign in to comment.