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

Function TEST

tests/tgf-graph-reader-tests.cpp:14–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using generative::io::from_wkt;
13
14TEST(TGFGraphReaderTests, IstreamSanity)
15{
16 std::istringstream input{"asdf 3.14\n"};
17
18 double pi = 0;
19 input >> pi;
20
21 EXPECT_TRUE(input.fail());
22 EXPECT_EQ(pi, 0);
23
24 // CLear the failure flags.
25 input.clear();
26
27 std::string misc;
28 input >> misc;
29 EXPECT_FALSE(input.fail());
30 EXPECT_EQ(misc, "asdf");
31
32 input >> pi;
33 EXPECT_FALSE(input.fail());
34 EXPECT_EQ(pi, 3.14);
35}
36
37TEST(TGFGraphReaderTests, IstreamReadRestofLineWithWhitespace)
38{

Callers

nothing calls this directly

Calls 3

from_wktFunction · 0.85
readMethod · 0.80
get_edge_pairsMethod · 0.80

Tested by

no test coverage detected