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

Function TEST

tests/cpp/types/Graph2D_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_graph2d, addEdges) {
11 F2CPoint p1 {1, -1}, p2 {2, -2}, p3 {-3, 3}, p4 {5, 5};
12 F2CGraph2D g;
13 g.addDirectedEdge(p1, p4, 1);
14 g.addDirectedEdge(p1, p3, 2);
15 g.addEdge(p3, p2, 6);
16 g.addEdge(p2, p1, 6);
17 g.addEdge(p4, p1, 6);
18
19 EXPECT_EQ(g.numNodes(), 4);
20 EXPECT_EQ(g.numEdges(), 7);
21}
22
23TEST(fields2cover_types_graph2d, allPathsBetween) {
24 F2CPoint p1 {1, -1}, p2 {2, -2}, p3 {-3, 3}, p4 {5, 5};

Callers

nothing calls this directly

Calls 6

numEdgesMethod · 0.80
backMethod · 0.80
shortestPathsAndCostsMethod · 0.80
numNodesMethod · 0.45
allPathsBetweenMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected