home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-13 | 1.0 KB | 63 lines | [TEXT/EDIT] |
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class AUX_INHERIT_ARRAY1[E]
-
- inherit
- ARRAY[E]
- rename make as array_make
- end;
-
- creation make
-
- feature
-
- make(init: ARRAY[E]) is
- local
- i: INTEGER;
- do
- from
- array_make(init.lower,init.upper);
- i := lower;
- until
- i > upper
- loop
- put(init.item(i),i);
- i := i + 1;
- end;
-
- is_true(not empty);
- is_true(count = 3);
-
- is_true(init.lower = lower);
- is_true(init.upper = upper);
- is_true(init.count = count);
-
-
- from
- i := lower;
- until
- i > upper
- loop
- is_true(init.item(i) = item(i));
- i := i + 1;
- end;
-
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_INHERIT_ARRAY1: ERROR Test # ");
- std_output.put_integer(cpt);
- std_output.put_string("%N");
- else
- -- std_output.put_string("Yes%N");
- end;
- end;
-
- cpt: INTEGER;
-
- end -- AUX_INHERIT_ARRAY1
-