home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / eiffel / smalleif.97 / se.t / SmallEiffel / lib_test / test_rename.e < prev    next >
Encoding:
Text File  |  1996-05-02  |  973 b   |  54 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_RENAME
  5.    
  6. inherit 
  7.    ANY
  8.       rename equal as dummy_equal
  9.       end;
  10.    
  11. creation {ANY}
  12.    make
  13.    
  14. feature {ANY}
  15.    
  16.    r: INTEGER is
  17.       do
  18.      Result := 1;
  19.       end;
  20.    
  21.    make is
  22.       local
  23.      aux_rename: AUX_RENAME;
  24.      c: TEST_RENAME;
  25.       do
  26.      -- ??     is_true(dummy_equal(Current,Current));
  27.      --     PB dans rename of real procedure.
  28.      
  29.      is_true(r = 1);
  30.      !!aux_rename;
  31.      is_true(aux_rename.r = 2);
  32.      is_true(aux_rename.super_r = 1);
  33.      c := Current;
  34.      is_true(c.r = 1);
  35.      c := aux_rename;
  36.      is_true(c.r = 1);
  37.       end;
  38.  
  39.    is_true(b: BOOLEAN) is
  40.       do
  41.      cpt := cpt + 1;
  42.      if not b then
  43.         std_output.put_string("TEST_RENAME: ERROR Test # ");
  44.         std_output.put_integer(cpt);
  45.         std_output.put_string("%N");
  46.      else
  47.         -- std_output.put_string("Yes%N");
  48.      end;
  49.       end;
  50.    
  51.    cpt: INTEGER;
  52.    
  53. end -- TEST_RENAME
  54.