373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
when Program_Error => null;
when Error : others =>
Test.Fail ("Wrong exception raised in Read_Atom");
Test.Report_Exception (Error, NT.Fail);
end Read_Atom_Test;
end Test_Atom_Accessor_Exceptions;
-------------------
-- Memory Stream --
-------------------
overriding procedure Read
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
|
when Program_Error => null;
when Error : others =>
Test.Fail ("Wrong exception raised in Read_Atom");
Test.Report_Exception (Error, NT.Fail);
end Read_Atom_Test;
end Test_Atom_Accessor_Exceptions;
procedure Next_And_Check
(Test : in out NT.Test;
Tested : in out Descriptor'Class;
Expected : in Events.Event;
Level : in Natural)
is
Event : Events.Event;
begin
Tested.Next (Event);
if Event /= Expected then
Test.Fail ("Found event "
& Events.Event'Image (Event)
& ", expected "
& Events.Event'Image (Expected));
elsif Tested.Current_Level /= Level then
Test.Fail ("Found event "
& Events.Event'Image (Event)
& " at level"
& Integer'Image (Tested.Current_Level)
& ", expected"
& Integer'Image (Level));
end if;
end Next_And_Check;
procedure Next_And_Check
(Test : in out NT.Test;
Tested : in out Descriptor'Class;
Expected : in Atom;
Level : in Natural)
is
Event : Events.Event;
begin
Tested.Next (Event);
if Event /= Events.Add_Atom then
Test.Fail ("Found event "
& Events.Event'Image (Event)
& ", expected Add_Atom");
else
Test_Tools.Test_Atom_Accessors (Test, Tested, Expected, Level);
end if;
end Next_And_Check;
-------------------
-- Memory Stream --
-------------------
overriding procedure Read
|