MCPcopy Create free account
hub / github.com/Notgnoshi/generative / TEST

Function TEST

tests/geometry-noder-tests.cpp:14–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using generative::io::from_wkt;
13
14TEST(GeometryNoderTests, TwoPoints)
15{
16 const std::unique_ptr<geos::geom::Geometry> geometries = from_wkt(
17 // clang-format off
18 "GEOMETRYCOLLECTION("
19 "POINT(1 1),"
20 "POINT(0 1)"
21 ")"
22 // clang-format on
23 );
24 ASSERT_TRUE(geometries);
25 const std::unique_ptr<geos::geom::Geometry> expected = from_wkt(
26 // clang-format off
27 "GEOMETRYCOLLECTION("
28 "POINT(1 1),"
29 "POINT(0 1)"
30 ")"
31 // clang-format on
32 );
33 ASSERT_TRUE(expected);
34
35 const std::unique_ptr<geos::geom::Geometry> noded =
36 generative::noding::GeometryNoder::node(*geometries);
37 ASSERT_TRUE(noded);
38 std::cerr << noded->toString() << std::endl;
39
40 EXPECT_EQ(noded->getGeometryType(), expected->getGeometryType());
41 EXPECT_TRUE(noded->equals(expected.get()));
42}
43
44TEST(GeometryNoderTests, DisjointPoint)
45{

Callers

nothing calls this directly

Calls 2

from_wktFunction · 0.85
nodeFunction · 0.50

Tested by

no test coverage detected