138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
+
|
procedure All_Tests (Report : in out NT.Reporter'Class) is
begin
Test_Basic_Usage (Report);
Test_Unknown_Commands (Report);
Test_Premanent_Fallback (Report);
Test_Local_Fallback (Report);
Test_Exception_Fallback (Report);
Test_Inspection (Report);
end All_Tests;
----------------------
-- Individual Tests --
----------------------
|
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
Test_Tools.Next_And_Check (Test, Cursor, Events.Close_List, 0);
Test_Tools.Next_And_Check (Test, Cursor, Events.End_Of_Input, 0);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Exception_Fallback;
procedure Test_Inspection (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Inspection");
begin
declare
Inter : Test_Interpreters.Interpreter;
begin
if not Inter.Is_Empty then
Test.Fail ("Default interpreter is not empty");
end if;
if Inter.Has_Command (To_Atom ("cmd")) then
Test.Fail ("Default interpreter has command ""cmd""");
end if;
Inter := Test_Interpreter;
if Inter.Is_Empty then
Test.Fail ("Test interpreter is empty");
end if;
if not Inter.Has_Command (To_Atom ("cmd")) then
Test.Fail ("Test interpreter has not command ""cmd""");
end if;
if Inter.Has_Command (To_Atom ("not-a-cmd")) then
Test.Fail ("Test interpreter has command ""not-a-cmd""");
end if;
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Inspection;
procedure Test_Local_Fallback (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Local fallback");
begin
declare
Inter : Test_Interpreters.Interpreter := Test_Interpreter;
Buffer : aliased Test_Tools.Memory_Stream;
|