diff --git a/test/test_gnt b/test/test_gnt index 4f6b035d84969c7528eaefa0f1d2054777997563..196c232934bd11adfd168efb011cba5a1e518f3a 100755 Binary files a/test/test_gnt and b/test/test_gnt differ diff --git a/test/test_gnt.cpp b/test/test_gnt.cpp index 3ecb7901391b437785740214d178551a71cc237c..08c787bf9eff3b02a32d463abf459b3614d57c6d 100644 --- a/test/test_gnt.cpp +++ b/test/test_gnt.cpp @@ -16,15 +16,15 @@ SCENARIO("Graph properties", "[graph nt]") int ac = g.add_edge("msg-ac", a,c); int bd = g.add_edge("msg-bd", b,d); int cd = g.add_edge("msg-cd", c,d); - + REQUIRE(g.get_node_data(a) == "A"); REQUIRE(g.get_node_data(b) == "B"); REQUIRE(g.get_node_data(c) == "C"); REQUIRE(g.get_node_data(d) == "D"); - + REQUIRE(ab == 0); REQUIRE(ac == 1); - + REQUIRE(g.get_edge_data(ab) == "msg-ab"); REQUIRE(g.get_edge_data(ac) == "msg-ac"); REQUIRE(g.get_edge_data(cd) == "msg-cd"); @@ -109,16 +109,18 @@ SCENARIO("Shortest paths", "[graph nt]") } class EdgeData { - std::string str; - double l; + std::string str; + double l; + double averageTime; public: - void set_string(const std::string &s) { str = s; } - std::string get_string() const { return str; } - void set_length(double len) { l = len; } - double get_length(double len) const { return l; } + void set_string(const std::string &s) { str = s; } + std::string get_string() const { return str; } + void set_length(double len) { l = len; } + double get_length(double len) const { return l; } + void set_avertageTime(double t) { averageTime = t; } + double get_averageTime(double t) const { return averageTime; } }; - SCENARIO("Decorators", "[graph nt]") { GIVEN("A graph with some items") { @@ -140,15 +142,15 @@ SCENARIO("Decorators", "[graph nt]") int ac = g.add_edge(_ac, a,c); int bd = g.add_edge(_bd, b,d); int cd = g.add_edge(_cd, c,d); - + REQUIRE(g.get_node_data(a) == "A"); REQUIRE(g.get_node_data(b) == "B"); REQUIRE(g.get_node_data(c) == "C"); REQUIRE(g.get_node_data(d) == "D"); - + REQUIRE(ab == 0); REQUIRE(ac == 1); - + EdgeData __ab = g.get_edge_data(ab); EdgeData __ac = g.get_edge_data(ac); EdgeData __cd = g.get_edge_data(cd);