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

Function TEST

tests/cpp/types/Strip_test.cpp:10–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "fields2cover/types.h"
9
10TEST(fields2cover_types_strip, clone) {
11 F2CSwath swath(F2CLineString({F2CPoint(0, 0), F2CPoint(0, 10)}), 2.0, 1);
12 F2CCells cells = swath.areaCovered();
13 F2CStrip strip1;
14 strip1.setCell(cells.getGeometry(0));
15 strip1.setName("TEST");
16 auto strip2 = strip1.clone();
17 EXPECT_EQ(strip1.getName(), "TEST");
18 EXPECT_EQ(strip2.getName(), "TEST");
19 EXPECT_NEAR(strip1.getCell().area(), 20.0, 1e-2);
20 EXPECT_NEAR(strip2.getCell().area(), 20.0, 1e-2);
21}
22

Callers

nothing calls this directly

Calls 8

areaCoveredMethod · 0.80
setCellMethod · 0.80
getCellMethod · 0.80
getGeometryMethod · 0.45
setNameMethod · 0.45
cloneMethod · 0.45
getNameMethod · 0.45
areaMethod · 0.45

Tested by

no test coverage detected