home *** CD-ROM | disk | FTP | other *** search
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_INTEGER_REF
-
- creation {ANY}
- make
-
- feature {ANY}
-
- make is
- local
- i: INTEGER;
- ir: INTEGER_REF;
- a: ANY;
- aa: ARRAY[ANY];
- do
- ir := 2;
- is_true(ir.item = 2);
- a := 2;
- is_true(equal(a,ir));
- is_true(equal(ir,2));
- is_true(equal(a,2));
-
- !!aa.make(1,1);
- aa.put(26,1);
- is_true(equal(aa.item(1),26));
-
- i := 5;
- ir := i;
- -- ??? is_true(i = ir);
-
- -- ??? is_true(26 = aa.item(1));
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_INTEGER_REF: 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_INTEGER_REF
-