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

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class BOOST_IS_STATIC
  5.  
  6. creation make
  7.  
  8. feature
  9.    
  10.    make is
  11.       local
  12.      b_true, b_false: BOOLEAN;
  13.      p: POINTER;
  14.       do
  15.      b_true := true;
  16.      b_false := false;
  17.      if true then
  18.         always_run;
  19.      else
  20.         c_inline_c("NoCcodeGenerated");
  21.      end;
  22.      if false then
  23.         c_inline_c("NoCcodeGenerated");
  24.      else
  25.         always_run;
  26.      end;
  27.      if false then
  28.         c_inline_c("NoCcodeGenerated");
  29.      elseif true then
  30.         always_run;
  31.      else
  32.         c_inline_c("NoCcodeGenerated");
  33.      end;
  34.      if 3 = 3 then
  35.         always_run;
  36.      else
  37.         c_inline_c("NoCcodeGenerated");
  38.      end;
  39.      if always_false then
  40.         c_inline_c("NoCcodeGenerated");
  41.      end;
  42.      if always_true then
  43.         always_run;
  44.      end;
  45.      if true then
  46.         always_run;
  47.      else
  48.      end;
  49.      if false then
  50.      else
  51.         always_run;
  52.      end;
  53.      if false then
  54.         c_inline_c("NoCcodeGenerated");
  55.      elseif false then
  56.         c_inline_c("NoCcodeGenerated");
  57.      elseif true then
  58.         always_run;
  59.      elseif true then
  60.         c_inline_c("NoCcodeGenerated");
  61.      else
  62.         c_inline_c("NoCcodeGenerated");
  63.      end;
  64.      if false then
  65.         c_inline_c("NoCcodeGenerated");
  66.      elseif false then
  67.         c_inline_c("NoCcodeGenerated");
  68.      elseif true then
  69.         always_run;
  70.      elseif b_true then
  71.         c_inline_c("NoCcodeGenerated");
  72.      else
  73.         c_inline_c("NoCcodeGenerated");
  74.      end;
  75.      if b_false then
  76.         is_true(false);
  77.      elseif false then
  78.         c_inline_c("NoCcodeGenerated");
  79.      elseif true then
  80.         always_run;
  81.      elseif b_true then
  82.         c_inline_c("NoCcodeGenerated");
  83.      else
  84.         c_inline_c("NoCcodeGenerated");
  85.      end;
  86.      if false then
  87.         c_inline_c("NoCcodeGenerated");
  88.      elseif always_false then
  89.         c_inline_c("NoCcodeGenerated");
  90.      else
  91.         always_run;
  92.      end;
  93.      if b_true then
  94.         always_run;
  95.      elseif always_false then
  96.         c_inline_c("NoCcodeGenerated");
  97.      elseif always_false then
  98.         c_inline_c("NoCcodeGenerated");
  99.      else
  100.         is_true(false);
  101.      end;
  102.      if 4 \\ 2 = 0 then
  103.         always_run;
  104.      else
  105.         c_inline_c("NoCcodeGenerated");
  106.      end;
  107.      if 4 // 2 = 2 then
  108.         always_run;
  109.      else
  110.         c_inline_c("NoCcodeGenerated");
  111.      end;
  112.      if not true then
  113.         c_inline_c("NoCcodeGenerated");
  114.      end;
  115.      if 3 = Void then
  116.         c_inline_c("NoCcodeGenerated");
  117.      end;
  118.      if Void = 3.5 then
  119.         c_inline_c("NoCcodeGenerated");
  120.      end;
  121.      if 0 = Void then
  122.         c_inline_c("NoCcodeGenerated");
  123.      end;
  124.      if 1 = Void then
  125.         c_inline_c("NoCcodeGenerated");
  126.      end;
  127.      if (Current = Void) and (3 = Void) then
  128.         c_inline_c("NoCcodeGenerated");
  129.      end;
  130.      if Current = Void then
  131.         c_inline_c("NoCcodeGenerated");
  132.      else
  133.         always_run;
  134.      end;
  135.      if p /= Void then
  136.         is_true(p /= Void);
  137.      else
  138.         c_inline_c("NoCcodeGenerated");
  139.      end;
  140.      if p = Void then
  141.         c_inline_c("NoCcodeGenerated");
  142.      else
  143.         is_true(p /= Void);
  144.      end;
  145.      if "foo" = Void then
  146.         c_inline_c("NoCcodeGenerated");
  147.      else
  148.         always_run;
  149.      end;
  150.      if (<<"foo">>) = Void then
  151.         c_inline_c("NoCcodeGenerated");
  152.      else
  153.         always_run;
  154.      end;
  155.      
  156.  
  157.      if Current /= Void then
  158.         always_run;
  159.      else
  160.         c_inline_c("NoCcodeGenerated");
  161.      end;
  162.      if p /= Void then
  163.         always_run;
  164.      else
  165.         c_inline_c("NoCcodeGenerated");
  166.      end;
  167.      if p = Void then
  168.         c_inline_c("NoCcodeGenerated");
  169.      else
  170.         is_true(p /= Void);
  171.      end;
  172.      if "foo" /= Void then
  173.         always_run;
  174.      else
  175.         c_inline_c("NoCcodeGenerated");
  176.      end;
  177.      if (<<"foo">>) /= Void then
  178.         always_run;
  179.      else
  180.         c_inline_c("NoCcodeGenerated");
  181.      end;
  182.       end;
  183.    
  184.    always_run is
  185.       do
  186.      is_true(true);
  187.       end;
  188.    
  189.    always_true: BOOLEAN is
  190.       do
  191.      Result := true;
  192.       end;
  193.    
  194.    always_false: BOOLEAN is do end;
  195.    
  196.    is_true(b: BOOLEAN) is
  197.       do
  198.      cpt := cpt + 1;
  199.      if not b then
  200.         std_output.put_string("TEST_IS_STATIC: ERROR Test # ");
  201.         std_output.put_integer(cpt);
  202.         std_output.put_string("%N");
  203.      else
  204.         -- std_output.put_string("Yes%N");
  205.      end;
  206.       end;
  207.    
  208.    cpt: INTEGER;
  209.    
  210. end -- BOOST_IS_STATIC
  211.