Code coverage for false.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 FALSE;
- copyright := "2003-2005 Jérome Boutet, 2003-2007 Benoit Sonntag";
- comment := "FALSE object";
- type := `char`;
- default := FALSE;
Section Inherit
- inherit_boolean:BOOLEAN := BOOLEAN;
Section Public
//
// Conditional :
//
- if_true block:{};
- if_false block:{} <-
( //? {block!=NULL};
block.value;
);
- if true_block:{} else false_block:{} <-
(
false_block.value;
);
- if_true true_block:{} else false_block:{} <-
(
false_block.value;
);
- if_false true_block:{} else false_block:{} <-
(
true_block.value;
);
- if true_block:{} :BOOLEAN <- FALSE;
- elseif cond:{BOOLEAN} then block:{} :BOOLEAN <-
( + result:BOOLEAN;
result := cond.value;
result.if {
block.value;
};
result
);
- elseif cond:{BOOLEAN} then block:{} else block_else:{} <-
(
(cond.value).if {
block.value;
} else {
block_else.value;
};
);
//
// Binary operator :
//
- Self:SELF '||' Left 10 other:{BOOLEAN} :BOOLEAN <- other.value;
- Self:SELF ' ' Left 20 other:{BOOLEAN} :BOOLEAN <- FALSE;
- Self:SELF '|' Left 10 other:BOOLEAN :BOOLEAN <- other;
- Self:SELF ' ' Left 20 other:BOOLEAN :BOOLEAN <- FALSE;
- Self:SELF '^' Left 10 other:BOOLEAN :BOOLEAN <- other;
- Self:SELF '->' Right 25 other:BOOLEAN :BOOLEAN <- TRUE;
- Self:SELF '->>' Right 25 other:{BOOLEAN} :BOOLEAN <- TRUE;
- Self:SELF '=>' s:ABSTRACT_STRING <-
(
);
//
// Prefix operator
//
- '!' Self:SELF :BOOLEAN <- TRUE;
//
// Convertion
//
- to_string:STRING <- "0".to_string;
- to_abstract_string:ABSTRACT_STRING <- "FALSE";
- to_integer:INTEGER <- 0;
- to_character:CHARACTER <- '0';