MCPcopy Create free account
hub / github.com/Fields2Cover/Fields2Cover / TEST

Function TEST

tests/cpp/types/Swath_test.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "fields2cover/types.h"
9
10TEST(fields2cover_types_swath, hasSameDir) {
11 F2CSwath swath1(F2CLineString({F2CPoint(0, 0), F2CPoint(1, 1)}), 1.0);
12 F2CSwath swath2 = swath1.clone();
13 swath2.reverse();
14 EXPECT_TRUE(swath1.hasSameDir(swath1));
15 EXPECT_FALSE(swath1.hasSameDir(swath2));
16 EXPECT_FALSE(swath2.hasSameDir(swath1));
17 swath1.targetSameDirAs(swath2);
18 EXPECT_TRUE(swath1.hasSameDir(swath2));
19 EXPECT_EQ(swath1.getPoint(0), F2CPoint(1, 1));
20}
21
22TEST(fields2cover_types_swath, comparison) {
23 F2CSwath swath1(F2CLineString({F2CPoint(0, 0), F2CPoint(1, 1)}), 1.0, 1);

Callers

nothing calls this directly

Calls 15

hasSameDirMethod · 0.80
targetSameDirAsMethod · 0.80
getPointMethod · 0.80
setPathMethod · 0.80
areaCoveredMethod · 0.80
cloneMethod · 0.45
reverseMethod · 0.45
addPointMethod · 0.45
lengthMethod · 0.45
setIdMethod · 0.45
getIdMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected