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 / boost_is_static.e < prev    next >
Encoding:
Text File  |  1996-05-02  |  3.0 KB  |  160 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_IS_STATIC
  5. creation {ANY}
  6.    make
  7. feature {ANY}
  8.    
  9.    make is
  10.       local
  11.      b_true, b_false: BOOLEAN;
  12.       do
  13.      b_true := true;
  14.      b_false := false;
  15.      if true then
  16.         always_run;
  17.      else
  18.         c_inline_c("NoCcodeGenerated");
  19.      end;
  20.      if false then
  21.         c_inline_c("NoCcodeGenerated");
  22.      else
  23.         always_run;
  24.      end;
  25.      if false then
  26.         c_inline_c("NoCcodeGenerated");
  27.      elseif true then
  28.         always_run;
  29.      else
  30.         c_inline_c("NoCcodeGenerated");
  31.      end;
  32.      if 3 = 3 then
  33.         always_run;
  34.      else
  35.         c_inline_c("NoCcodeGenerated");
  36.      end;
  37.      if always_false then
  38.         c_inline_c("NoCcodeGenerated");
  39.      end;
  40.      if always_true then
  41.         always_run;
  42.      end;
  43.      if true then
  44.         always_run;
  45.      else
  46.      end;
  47.      if false then
  48.      else
  49.         always_run;
  50.      end;
  51.      if false then
  52.         c_inline_c("NoCcodeGenerated");
  53.      elseif false then
  54.         c_inline_c("NoCcodeGenerated");
  55.      elseif true then
  56.         always_run;
  57.      elseif true then
  58.         c_inline_c("NoCcodeGenerated");
  59.      else
  60.         c_inline_c("NoCcodeGenerated");
  61.      end;
  62.      if false then
  63.         c_inline_c("NoCcodeGenerated");
  64.      elseif false then
  65.         c_inline_c("NoCcodeGenerated");
  66.      elseif true then
  67.         always_run;
  68.      elseif b_true then
  69.         c_inline_c("NoCcodeGenerated");
  70.      else
  71.         c_inline_c("NoCcodeGenerated");
  72.      end;
  73.      if b_false then
  74.         is_true(false);
  75.      elseif false then
  76.         c_inline_c("NoCcodeGenerated");
  77.      elseif true then
  78.         always_run;
  79.      elseif b_true then
  80.         c_inline_c("NoCcodeGenerated");
  81.      else
  82.         c_inline_c("NoCcodeGenerated");
  83.      end;
  84.      if false then
  85.         c_inline_c("NoCcodeGenerated");
  86.      elseif always_false then
  87.         c_inline_c("NoCcodeGenerated");
  88.      else
  89.         always_run;
  90.      end;
  91.      if b_true then
  92.         always_run;
  93.      elseif always_false then
  94.         c_inline_c("NoCcodeGenerated");
  95.      elseif always_false then
  96.         c_inline_c("NoCcodeGenerated");
  97.      else
  98.         is_true(false);
  99.      end;
  100.      if 4 \\ 2 = 0 then
  101.         always_run;
  102.      else
  103.         c_inline_c("NoCcodeGenerated");
  104.      end;
  105.      if 4 // 2 = 2 then
  106.         always_run;
  107.      else
  108.         c_inline_c("NoCcodeGenerated");
  109.      end;
  110.      if not true then
  111.         c_inline_c("NoCcodeGenerated");
  112.      end;
  113.      if 3 = Void then
  114.         c_inline_c("NoCcodeGenerated");
  115.      end;
  116.      if Void = 3.5 then
  117.         c_inline_c("NoCcodeGenerated");
  118.      end;
  119.      if 0 = Void then
  120.         c_inline_c("NoCcodeGenerated");
  121.      end;
  122.      if 1 = Void then
  123.         c_inline_c("NoCcodeGenerated");
  124.      end;
  125.      if Current = Void then
  126.         c_inline_c("NoCcodeGenerated");
  127.      end;
  128.      if (Current = Void) and (3 = Void) then
  129.         c_inline_c("NoCcodeGenerated");
  130.      end;
  131.       end;
  132.    
  133.    always_run is
  134.       do
  135.      is_true(true);
  136.       end;
  137.    
  138.    always_true: BOOLEAN is
  139.       do
  140.      Result := true;
  141.       end;
  142.    
  143.    always_false: BOOLEAN is do end;
  144.    
  145.    is_true(b: BOOLEAN) is
  146.       do
  147.      cpt := cpt + 1;
  148.      if not b then
  149.         std_output.put_string("TEST_IS_STATIC: ERROR Test # ");
  150.         std_output.put_integer(cpt);
  151.         std_output.put_string("%N");
  152.      else
  153.         -- std_output.put_string("Yes%N");
  154.      end;
  155.       end;
  156.    
  157.    cpt: INTEGER;
  158.    
  159. end -- TEST_IS_STATIC
  160.