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_DEFAULT_VALUE
-
- creation {ANY}
- make
-
- feature {ANY}
-
- integer_attribute: INTEGER;
-
- reference_attribute: like Current;
-
- real_attribute: REAL;
-
- double_attribute: DOUBLE;
-
- boolean_attribute: BOOLEAN;
-
- character_attribute: CHARACTER;
-
- check_attribute is
- do
- is_true(integer_attribute = 0);
- is_true(reference_attribute = Void);
- is_true(real_attribute = 0.0);
- is_true(double_attribute = 0.0);
- is_true(boolean_attribute = false);
- is_true(character_attribute = '%U');
-
- end;
-
- make is
- local
- integer_local: INTEGER;
- reference_local: like Current;
- real_local: REAL;
- double_local: DOUBLE;
- boolean_local: BOOLEAN;
- character_local: CHARACTER;
- do
- is_true(integer_local = 0);
- is_true(reference_local = Void);
- is_true(real_local = 0.0);
- is_true(double_local = 0.0);
- is_true(boolean_local = false);
- is_true(character_local = '%U');
-
- check_attribute;
- standard_clone(Current).check_attribute;
- clone(Current).check_attribute;
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_DEFAULT_VALUE: 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_DEFAULT_VALUE
-