1use Test::More tests => 12; 2 3use Graph; 4my $g = Graph->new; 5 6$g->add_path("a", "b", "c"); 7 8ok( $g->has_edge("a", "b") ); 9ok( ! $g->has_edge("a", "c") ); # @todo: hyperedges 10ok( ! $g->has_edge("b", "a") ); 11ok( $g->has_edge("b", "c") ); 12ok( ! $g->has_edge("c", "a") ); 13ok( ! $g->has_edge("c", "b") ); 14 15my $h = Graph->new(undirected => 1); 16 17$h->add_path("a", "b", "c"); 18 19ok( $h->has_edge("a", "b") ); 20ok( ! $h->has_edge("a", "c") ); # @todo: hyperedges 21ok( $h->has_edge("b", "a") ); 22ok( $h->has_edge("b", "c") ); 23ok( ! $h->has_edge("c", "a") ); # @todo: hyperedges 24ok( $h->has_edge("c", "b") ); 25 26