summaryrefslogtreecommitdiff
path: root/test/graph_tests.ads
diff options
context:
space:
mode:
Diffstat (limited to 'test/graph_tests.ads')
-rw-r--r--test/graph_tests.ads38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/graph_tests.ads b/test/graph_tests.ads
index 18ea321..c2dddfe 100644
--- a/test/graph_tests.ads
+++ b/test/graph_tests.ads
@@ -25,6 +25,44 @@ package Graph_Tests is
Edge_Label_Type => Edge_Label);
+ No_Nodes : Graphs.Node_Array (1 .. 0);
+ No_Edges : Graphs.Edge_Array (1 .. 0);
+
+ Dup_Nodes : constant Graphs.Node_Array := (1, 2, 2, 3, 5, 9, 9, 9);
+
+ Some_Nodes : constant Graphs.Node_Array := (2, 5, 9, 11);
+ Some_Edges : constant Graphs.Edge_Array := ((7, 2, 5), (2, 9, 11), (5, 11, 2));
+
+ My_Empty_Graph : constant Graphs.Graph := Graphs.To_Graph (No_Nodes, No_Edges);
+ My_Nonempty_Graph : constant Graphs.Graph := Graphs.To_Graph (Some_Nodes, Some_Edges);
+
+ Complex_Nodes : constant Graphs.Node_Array := (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+ Complex_Edges : constant Graphs.Edge_Array :=
+ ((1, 1, 2), (2, 2, 3), (3, 2, 4), (4, 2, 4),
+ (5, 1, 5), (6, 5, 6), (7, 5, 7), (8, 6, 8), (9, 6, 9), (10, 7, 9), (11, 7, 10),
+ (12, 7, 7), (13, 7, 5));
+
+ My_Complex_Graph : constant Graphs.Graph := Graphs.To_Graph (Complex_Nodes, Complex_Edges);
+
+ Neigh_Nodes : constant Graphs.Node_Array := (2, 3, 4, 5);
+ Neigh_Edges : constant Graphs.Edge_Array :=
+ ((1, 2, 3), (2, 3, 2), (3, 3, 4), (4, 4, 5), (5, 5, 4), (6, 4, 3));
+
+ My_Neigh_Graph : Graphs.Graph := Graphs.To_Graph (Neigh_Nodes, Neigh_Edges);
+
+
+private
+
+
+ generic
+ type Element_Type is private;
+ type Index_Type is (<>);
+ type Array_Type is array (Index_Type range <>) of Element_Type;
+ function Is_Permutation
+ (Left, Right : in Array_Type)
+ return Boolean;
+
+
end Graph_Tests;