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 / bug_bit1.e < prev    next >
Encoding:
Text File  |  1996-05-02  |  684 b   |  38 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_BIT1
  5.  
  6. creation {ANY}
  7.    make
  8.    
  9. feature {ANY}
  10.    
  11.    make is
  12.       local
  13.      b1: BIT 1;
  14.       do
  15.      is_true(b1.count = 0);
  16.      is_true(not b1.item(1));
  17.      b1.put(true,1);
  18.      is_true(b1.item(1));
  19.      b1.put(false,1);
  20.      is_true(not b1.item(1));
  21.       end;
  22.    
  23.    is_true(b: BOOLEAN) is
  24.       do
  25.      cpt := cpt + 1;
  26.      if not b then
  27.         std_output.put_string("TEST_BIT1: ERROR Test # ");
  28.         std_output.put_integer(cpt);
  29.         std_output.put_string("%N");
  30.      else
  31.         std_output.put_string("Yes%N");
  32.      end;
  33.       end;
  34.    
  35.    cpt: INTEGER;
  36.    
  37. end -- TEST_BIT1
  38.