Natools

Check-in [d1c2d9f36c]
Login
Overview
Comment:s_expressions-lockable-tests: extended lockable interface test to reach full coverage of both implementations
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d1c2d9f36c554a47083f4b027b965e22a06c60b5
User & Date: nat on 2014-03-10 19:54:53
Other Links: manifest | tags
Context
2014-03-11
19:33
coverage.sh: add more configuration variables for better flexibility check-in: 577fa9c3d6 user: nat tags: trunk
2014-03-10
19:54
s_expressions-lockable-tests: extended lockable interface test to reach full coverage of both implementations check-in: d1c2d9f36c user: nat tags: trunk
2014-03-09
15:34
s_expressions-generic_caches: fix incorrect handling of Open_List and Close_List on brand new cache objects check-in: 8f20693700 user: nat tags: trunk
Changes

Modified tests/natools-s_expressions-lockable-tests.adb from [6bef92fef0] to [231d964525].

23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
23
24
25
26
27
28
29

30
31
32
33
34
35
36
37







-
+







   -- Lockable.Descriptor Tests --
   -------------------------------

   function Test_Expression return Atom is
   begin
      return To_Atom ("(begin(command1 arg1.1 arg1.2)"
        & "(command2 (subcmd2.1 arg2.1.1) (subcmd2.3) arg2.4)"
        & "end)");
        & "end)5:extra");
   end Test_Expression;


   procedure Test_Interface
     (Test : in out NT.Test;
      Object : in out Lockable.Descriptor'Class)
   is
110
111
112
113
114
115
116














117
118
119
120
121
122
123
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137







+
+
+
+
+
+
+
+
+
+
+
+
+
+







         end if;
      end;

      Object.Unlock (Level_1);

      Test_Tools.Next_And_Check (Test, Object, To_Atom ("end"), Base);
      Test_Tools.Next_And_Check (Test, Object, Events.Close_List, Base - 1);
      Test_Tools.Next_And_Check (Test, Object, To_Atom ("extra"), Base - 1);
      Object.Lock (Level_1);
      Test_Tools.Test_Atom_Accessors (Test, Object, To_Atom ("extra"), 0);
      Object.Unlock (Level_1);

      declare
         Event : constant Events.Event := Object.Current_Event;
      begin
         if Event /= Events.End_Of_Input then
            Test.Fail ("Last current event is "
              & Events.Event'Image (Event)
              & ", expected End_Of_Input");
         end if;
      end;
   end Test_Interface;



   -------------------------
   -- Complete Test Suite --
   -------------------------