Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /charles/src/testdir/

charles
Discussion topic

Back to topic list

CVS update: /charles/src/testdir/

Reply

Author matthewjheaney
Full name Matthew Heaney
Date 2004-03-11 11:50:16 PST
Message User: matthewjheaney
Date: 04/03/11 11:50:16

Modified:
 /charles/src/testdir/
  test_unbounded_single_list.adb

Log:
 implemented filter function generic_delete (predicate)

File Changes:

Directory: /charles/src/testdir/
====================​============

File [changed]: test_unbounded_single_list.adb
Url: http://charles.tigri​s.org/source/browse/​charles/src/testdir/​test_unbounded_singl​e_list.adb?r1=1.1​&r2=1.2
Delta lines: +28 -25
---------------------
--- test_unbounded_single_list.adb 11 Mar 2004 04:53:50 -0000 1.1
+++ test_unbounded_single_list.adb 11 Mar 2004 19:50:14 -0000 1.2
@@ -74,11 +74,11 @@
          E := Random (G) mod 1000;
          N := Length (C);
 
- Put ("e=");
- Put (E, Width => 0);
- Put (" n=");
- Put (N, Width => 0);
- New_Line;
+-- Put ("e=");
+-- Put (E, Width => 0);
+-- Put (" n=");
+-- Put (N, Width => 0);
+-- New_Line;
 
          Insert_After
            (Container => C,
@@ -132,8 +132,8 @@
 -- pragma Assert (Is_Sorted (C2));
          end;
 
- Print (C);
- New_Line;
+-- Print (C);
+-- New_Line;
 
       end loop;
 
@@ -143,7 +143,7 @@
    C, C2 : Container_Type;
 
    I, J : Iterator_Type;
- --E : Integer;
+ E : Integer;
 
    N : Natural;
 
@@ -229,34 +229,37 @@
 -- Sort (C);
 -- pragma Assert (Is_Sorted (C2));
 
--- Put_Line ("inserting");
+ Put_Line ("inserting");
 
--- Populate (C);
+ Populate (C);
 
--- Put_Line ("deleting");
+ Put_Line ("deleting");
 
--- while not Is_Empty (C) loop
+ while not Is_Empty (C) loop
 
--- -- Put (Length (C), Width => 0);
--- -- New_Line;
+-- Put (Length (C), Width => 0);
+-- New_Line;
 
--- -- Sort (C);
--- -- pragma Assert (Is_Sorted (C2));
+-- Sort (C);
+-- pragma Assert (Is_Sorted (C2));
 
--- I := First (C);
+ I := First (C);
 
--- for Index in 1 .. Random (G) mod Length (C) loop
--- Increment (I);
--- end loop;
+ for Index in 1 .. Random (G) mod Length (C) loop
+ Increment (I);
+ end loop;
 
--- E := Element (I);
+ E := Element (I);
 
--- Delete (C, Item => E);
+ N := Length (C);
 
--- pragma Assert (not Is_In (E, C));
--- pragma Assert (Find (C, E) = Back (C));
+ Delete (C, Item => E);
 
--- end loop;
+ pragma Assert (Length (C) < N);
+ pragma Assert (not Is_In (E, C));
+ pragma Assert (Find (C, E) = Back (C));
+
+ end loop;
 
 -- Sort (C);
 -- pragma Assert (Is_Sorted (C2));




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@char​les.tigris.org
For additional commands, e-mail: cvs-help at charles dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /charles/src/testdir/ matthewjheaney Matthew Heaney 2004-03-11 11:50:16 PST
Messages per page: