home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_test / test_object_size.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  826 b   |  42 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_OBJECT_SIZE
  5.  
  6. creation make
  7.    
  8. feature 
  9.    
  10.    make is
  11.       local
  12.      i: INTEGER;
  13.      b: BOOLEAN;
  14.      c: CHARACTER;
  15.      r: REAL;
  16.      d: DOUBLE;
  17.       do
  18.      is_true(c.object_size >= 1);
  19.      is_true(i.object_size >= 1);
  20.      is_true(r.object_size >= 1);
  21.  
  22.      is_true(c.object_size <= b.object_size);
  23.      is_true(i.object_size = b.object_size);
  24.      is_true(r.object_size <= d.object_size);
  25.       end;
  26.    
  27.    is_true(b: BOOLEAN) is
  28.       do
  29.      cpt := cpt + 1;
  30.      if not b then
  31.         std_output.put_string("TEST_INTEGER1: ERROR Test # ");
  32.         std_output.put_integer(cpt);
  33.         std_output.put_string("%N");
  34.      else
  35.         -- std_output.put_string("Yes%N");
  36.      end;
  37.       end;
  38.    
  39.    cpt: INTEGER;
  40.    
  41. end -- TEST_INTEGER1
  42.