Natools

Check-in [e0c2566ea5]
Login
Overview
Comment:chunked_strings-tests-coverage: test Trim with multiple-chunk prefix
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e0c2566ea566580579ed0a1abab84ba4ce48c946
User & Date: nat on 2013-11-18 20:21:47
Other Links: manifest | tags
Context
2013-11-19
21:41
chunked_strings-tests-bugfixes: Fix test suite description check-in: 431d105c2c user: nat tags: trunk
2013-11-18
20:21
chunked_strings-tests-coverage: test Trim with multiple-chunk prefix check-in: e0c2566ea5 user: nat tags: trunk
2013-11-14
22:56
string_slices-slice_sets: fix Subset bug when lower bound is between slices check-in: 5bfb52fc1f user: nat tags: trunk
Changes

Modified tests/natools-chunked_strings-tests-coverage.adb from [f1215135e1] to [a980bf9df5].

522
523
524
525
526
527
528





















529
530
531
532
533
534
            Report_Result (Name, Reported);
            NT.Info (Report, "Found """ & To_String (CS_Right) & '"');
            NT.Info (Report, "Expected """ & Right & '"');
         end if;
      end;

      Report_Result (Name, Reported, NT.Success);





















   exception
      when Error : others => NT.Report_Exception (Report, Name, Error);
   end;

   Natools.Tests.End_Section (Report);
end Natools.Chunked_Strings.Tests.Coverage;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
            Report_Result (Name, Reported);
            NT.Info (Report, "Found """ & To_String (CS_Right) & '"');
            NT.Info (Report, "Expected """ & Right & '"');
         end if;
      end;

      Report_Result (Name, Reported, NT.Success);
   exception
      when Error : others => NT.Report_Exception (Report, Name, Error);
   end;

   declare
      Name : constant String := "Multi-chunk Trim prefix";
      Str : constant String
        := Ada.Strings.Fixed."*" (Default_Chunk_Size * 2, ' ') & "   word";
      CS : Chunked_String := To_Chunked_String (Str);
      Space_Set : constant Ada.Strings.Maps.Character_Set
        := Ada.Strings.Maps.To_Set (" ");
   begin
      CS.Trim (Space_Set, Space_Set);

      if CS.To_String = "word" then
         NT.Item (Report, Name, NT.Success);
      else
         NT.Item (Report, Name, NT.Fail);
         NT.Info (Report, "Found """ & CS.To_String & '"');
         NT.Info (Report, "Expected ""word""");
      end if;
   exception
      when Error : others => NT.Report_Exception (Report, Name, Error);
   end;

   Natools.Tests.End_Section (Report);
end Natools.Chunked_Strings.Tests.Coverage;