home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-13 | 871 b | 46 lines | [TEXT/EDIT] |
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_ARRAY5
-
- creation make
-
- feature
-
- make is
- local
- a: ARRAY[INTEGER];
- do
- a := <<1,2,3,4>>;
- a.remove_first;
- is_true(a.lower = 2);
- is_true(a.first = 2);
- is_true(a.last = 4);
- a.remove_first;
- is_true(a.lower = 3);
- is_true(a.first = 3);
- is_true(a.last = 4);
- a.remove_first;
- is_true(a.lower = 4);
- is_true(a.first = 4);
- is_true(a.last = 4);
- a.remove_first;
- is_true(a.empty);
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_ARRAY: ERROR Test # ");
- std_output.put_integer(cpt);
- std_output.put_string("%N");
- else
- -- std_output.put_string("Yes%N");
- end;
- end;
-
- cpt: INTEGER;
-
- end -- TEST_ARRAY5
-