diff --git a/testsuite/tests/hash/test.yaml b/testsuite/tests/hash/test.yaml index fde3f872..c944e34a 100644 --- a/testsuite/tests/hash/test.yaml +++ b/testsuite/tests/hash/test.yaml @@ -1,4 +1,5 @@ description: Basic GNATCOLL.Hash test +timeout: 500 # Default time is not enough for the valgrind run control: - [SKIP, "env.target.machine == 'qemu'", "Not enough disk space on cross qemu configuration"] diff --git a/testsuite/tests/paragraph_filling/text/test.adb b/testsuite/tests/paragraph_filling/text/test.adb index f5be952e..2f644cee 100644 --- a/testsuite/tests/paragraph_filling/text/test.adb +++ b/testsuite/tests/paragraph_filling/text/test.adb @@ -35,10 +35,10 @@ function Test return Integer is subtype Acc is GNAT.Strings.String_Access; - S_In : constant Acc := Read_File (Create_From_Base ("in.txt")); - S_Gr : constant Acc := Read_File (Create_From_Base ("greedy.txt")); - S_Pr : constant Acc := Read_File (Create_From_Base ("pretty.txt")); - S_Kn : constant Acc := Read_File (Create_From_Base ("knuth.txt")); + S_In : Acc := Read_File (Create_From_Base ("in.txt")); + S_Gr : Acc := Read_File (Create_From_Base ("greedy.txt")); + S_Pr : Acc := Read_File (Create_From_Base ("pretty.txt")); + S_Kn : Acc := Read_File (Create_From_Base ("knuth.txt")); begin @@ -58,5 +58,10 @@ begin A.Assert (S_Kn.all, ASU.To_String (Knuth_Fill (S_In.all, 60)), "Knuth fill"); + GNAT.Strings.Free (S_In); + GNAT.Strings.Free (S_Gr); + GNAT.Strings.Free (S_Pr); + GNAT.Strings.Free (S_Kn); + return A.Report; end Test; diff --git a/testsuite/tests/promises/test.adb b/testsuite/tests/promises/test.adb index bee58576..4862644d 100644 --- a/testsuite/tests/promises/test.adb +++ b/testsuite/tests/promises/test.adb @@ -24,6 +24,7 @@ with Ada.Text_IO; use Ada.Text_IO; with GNATCOLL.Promises; use GNATCOLL.Promises; with Test_Promises_Support; use Test_Promises_Support; +with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Test_Assert; @@ -64,7 +65,7 @@ begin and new Convert_Float and new Display_String); Put_Line ("Failing..."); - Message := new String'("Explicit failure"); + Message := To_Unbounded_String ("Explicit failure"); P.Set_Error ("Explicit failure"); A.Assert (A.Assert_Count, 7, "expected number of asserts #2"); @@ -74,7 +75,8 @@ begin and new Fail_On_Float and (new Display_String & new Display_String)); Baseline := 3; - Message := new String'("explicit"); + + Message := To_Unbounded_String ("explicit"); P.Set_Value (3); A.Assert (A.Assert_Count, 11, "expected number of asserts #3"); diff --git a/testsuite/tests/promises/test_promises_support.adb b/testsuite/tests/promises/test_promises_support.adb index 933a49f9..6ab8fcf8 100644 --- a/testsuite/tests/promises/test_promises_support.adb +++ b/testsuite/tests/promises/test_promises_support.adb @@ -80,7 +80,7 @@ package body Test_Promises_Support is pragma Unreferenced (Self); begin Put_Line ("Display_String.Failed because " & Reason); - A.Assert (Reason, Message.all, "expected reason"); + A.Assert (Reason, To_String (Message), "expected reason"); end On_Error; overriding procedure On_Next diff --git a/testsuite/tests/promises/test_promises_support.ads b/testsuite/tests/promises/test_promises_support.ads index 72404a8a..4886962f 100644 --- a/testsuite/tests/promises/test_promises_support.ads +++ b/testsuite/tests/promises/test_promises_support.ads @@ -22,11 +22,12 @@ ------------------------------------------------------------------------------ with GNATCOLL.Promises; use GNATCOLL.Promises; +with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Test_Promises_Support is Baseline : Integer := 0; - Message : access String; + Message : Unbounded_String; -- Values that Assert routines should verify package Int_Promises is new Promises (Integer); diff --git a/testsuite/tests/vfs/basic/test.adb b/testsuite/tests/vfs/basic/test.adb index 30d999bb..25b17430 100644 --- a/testsuite/tests/vfs/basic/test.adb +++ b/testsuite/tests/vfs/basic/test.adb @@ -72,7 +72,17 @@ function Test return Integer is Write (W, "first word "); Close (W); W := Write_File (F, Append => True); - Write (W, Interfaces.C.Strings.New_String ("second word")); + + declare + use Interfaces.C.Strings; + + C_String : chars_ptr := + Interfaces.C.Strings.New_String ("second word"); + begin + Write (W, C_String); + Free (C_String); + end; + Close (W); -- Check whether the file exists