You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/Clipper2Lib-/CPP/Tests/TestSimplifyPath.cpp

11 lines
348 B
C++

1 month ago
#include "clipper2/clipper.h"
#include <gtest/gtest.h>
using namespace Clipper2Lib;
TEST(Clipper2Tests, TestSimplifyPath) {
Path64 input1 = MakePath({
0,0, 1,1, 0,20, 0,21, 1,40, 0,41, 0,60, 0,61, 0,80, 1,81, 0,100
});
Path64 output1 = SimplifyPath(input1, 2, false);
EXPECT_EQ(Length(output1), 100);
EXPECT_EQ(output1.size(), 2);
}