Code coverage for true.li

///////////////////////////////////////////////////////////////////////////////
//                             Lisaac Library                                //
//                                                                           //
//                   LSIIT - ULP - CNRS - INRIA - FRANCE                     //
//                                                                           //
//   This program is free software: you can redistribute it and/or modify    //
//   it under the terms of the GNU General Public License as published by    //
//   the Free Software Foundation, either version 3 of the License, or       //
//   (at your option) any later version.                                     //
//                                                                           //
//   This program is distributed in the hope that it will be useful,         //
//   but WITHOUT ANY WARRANTY; without even the implied warranty of          //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           //
//   GNU General Public License for more details.                            //
//                                                                           //
//   You should have received a copy of the GNU General Public License       //
//   along with this program.  If not, see <http://www.gnu.org/licenses/>.   //
//                                                                           //
//                     http://isaacproject.u-strasbg.fr/                     //
///////////////////////////////////////////////////////////////////////////////
Section Header

  + name    := Expanded TRUE;


  - copyright   := "2003-2005 Jérome Boutet, 2003-2007 Benoit Sonntag";

  - comment := "TRUE object";

  - type    := `char`;
  - default := TRUE;

Section Inherit

  - inherit_boolean:BOOLEAN := BOOLEAN;

Section Public

  //
  // Conditional :
  //

  - if_true block:{}  <-
  (
    block.value;
  );

  - if_false block:{};

  - if true_block:{} else false_block:{} <-
  (
    true_block.value;
  );

  - if_true true_block:{} else false_block:{} <-
  (
    true_block.value;
  );

  - if_false true_block:{} else false_block:{} <-
  (
    false_block.value;
  );

  - if true_block:{} :BOOLEAN <-
  (
    true_block.value;
    TRUE
  );

  - elseif cond:{BOOLEAN} then block:{} :BOOLEAN <- TRUE;

  - elseif cond:{BOOLEAN} then block:{} else block_else:{};

  //
  // Binary operator :
  //

  - Self:SELF '||'  Left 10  other:{BOOLEAN}   :BOOLEAN <- TRUE;   // or else

  - Self:SELF '  '  Left 20  other:{BOOLEAN}   :BOOLEAN <- other.value;  // and then

  - Self:SELF '|'   Left 10  other:BOOLEAN :BOOLEAN <- TRUE;  // or

  - Self:SELF ' '   Left 20  other:BOOLEAN :BOOLEAN <- other; // and

  - Self:SELF '^'  Left 10  other:BOOLEAN :BOOLEAN <- ! other;

  - Self:SELF '->'  Right 25 other:BOOLEAN :BOOLEAN <- other;

  - Self:SELF '->>' Right 25 other:{BOOLEAN}  :BOOLEAN <- other.value;

  - Self:SELF '=>' s:ABSTRACT_STRING <-
  (
    s.print;
    `while (1)`;
  );

  //
  // Prefix operator
  //

  - '!' Self:SELF :BOOLEAN <- FALSE;

  //
  // Conversion
  //

  - to_string:STRING       <- "1".to_string; // BSBS: A revoir ...

  - to_abstract_string:ABSTRACT_STRING <- "TRUE";

  - to_integer:INTEGER     <- 1;

  - to_character:CHARACTER <- '1';