package body Graph_Tests.Curses is function First_Check return Test_Result is use type Graphs.Cursor; begin if My_Complex_Graph.First /= My_Complex_Graph.To_Cursor (1) or My_Nonempty_Graph.First /= My_Nonempty_Graph.To_Cursor (2) then return Fail; end if; return Pass; end First_Check; function Last_Check return Test_Result is use type Graphs.Cursor; begin if My_Complex_Graph.Last /= My_Complex_Graph.To_Cursor (10) or My_Nonempty_Graph.Last /= My_Nonempty_Graph.To_Cursor (11) then return Fail; end if; return Pass; end Last_Check; function Next_Check return Test_Result is use type Graphs.Cursor; begin if Graphs.Next (My_Complex_Graph.To_Cursor (3)) /= My_Complex_Graph.To_Cursor (4) or Graphs.Next (My_Complex_Graph.To_Cursor (10)) /= Graphs.No_Element then return Fail; end if; return Pass; end Next_Check; function Previous_Check return Test_Result is use type Graphs.Cursor; begin if Graphs.Previous (My_Complex_Graph.To_Cursor (6)) /= My_Complex_Graph.To_Cursor (5) or Graphs.Previous (My_Complex_Graph.To_Cursor (1)) /= Graphs.No_Element then return Fail; end if; return Pass; end Previous_Check; function Follow_Check return Test_Result is use type Graphs.Cursor; Start : Graphs.Cursor := My_Complex_Graph.To_Cursor (1); begin if Graphs.Follow (Start, (1, 1, 2)) /= My_Complex_Graph.To_Cursor (2) then return Fail; end if; return Pass; end Follow_Check; function Cursor_To_Check return Test_Result is use type Graphs.Cursor; Start : Graphs.Cursor := My_Complex_Graph.To_Cursor (2); begin if Graphs.Cursor_To (Start, 9) /= My_Complex_Graph.To_Cursor (9) then return Fail; end if; return Pass; end Cursor_To_Check; end Graph_Tests.Curses;