From 42d3982f1e6335cb99c382ddd91c324e5fa458ad Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 20 Apr 2020 15:49:56 +1000 Subject: Updated and fixed tests, fixed Pass_Forward array sliding bug --- test/ratnest-tests-tokens.adb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'test/ratnest-tests-tokens.adb') diff --git a/test/ratnest-tests-tokens.adb b/test/ratnest-tests-tokens.adb index 7a2588a..41969fd 100644 --- a/test/ratnest-tests-tokens.adb +++ b/test/ratnest-tests-tokens.adb @@ -17,11 +17,11 @@ package body Tokens is A : My_Tokens.Token; begin declare - B : My_Tokens.Token := My_Tokens.Create (One, 1, 3, "abc"); + B : My_Tokens.Token := My_Tokens.Create (One, 1, "abc"); begin A := B; end; - if not A.Initialized or else A.Value /= "abc" then + if My_Tokens.Value (A) /= "abc" then return Fail; end if; return Pass; @@ -35,8 +35,8 @@ package body Tokens is return Test_Result is use type My_Tokens.Token; - A : My_Tokens.Token := My_Tokens.Create (One, 1, 3, "abc"); - B : My_Tokens.Token := My_Tokens.Create (One, 1, 3, "abc"); + A : My_Tokens.Token := My_Tokens.Create (One, 1, "abc"); + B : My_Tokens.Token := My_Tokens.Create (One, 1, "abc"); begin if A /= B then return Fail; @@ -51,12 +51,11 @@ package body Tokens is function Store_Check return Test_Result is - T : My_Tokens.Token := My_Tokens.Create (One, 1, 3, "abc"); + T : My_Tokens.Token := My_Tokens.Create (One, 1, "abc"); begin - if not T.Initialized or else - T.Label /= One or else - T.Start /= 1 or else T.Finish /= 3 or else - T.Value /= "abc" + if My_Tokens.Label (T) /= One or else + My_Tokens.Start (T) /= 1 or else + My_Tokens.Value (T) /= "abc" then return Fail; end if; -- cgit