home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-13 | 772 b | 43 lines | [TEXT/EDIT] |
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_POINTER1
-
- creation make
-
- feature
-
- make is
- local
- p: POINTER;
- a: ANY;
- pr: POINTER_REF;
- do
- is_true(p /= Void);
- is_true(not (p = Void));
- is_true(p.is_void);
- is_true(not p.is_not_void);
-
- a := p;
- is_true(a /= Void);
- pr := p;
- is_true(pr /= Void);
- is_true(pr.item.is_void);
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_POINTER1: 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_POINTER1
-