/test/lib/numeric/number/test_number61.e
Specman e | 73 lines | 45 code | 6 blank | 22 comment | 0 complexity | bf18caec57faa5010fc4ac24eebb2755 MD5 | raw file
1-- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries. 2-- See the Copyright notice at the end of this file. 3-- 4class TEST_NUMBER61 5 -- tests on infix ">=" 6 7insert 8 EIFFELTEST_TOOLS 9 PLATFORM 10 NUMBER_TOOLS 11 12create {} 13 make 14 15feature {ANY} 16 make 17 local 18 n1, n2: NUMBER 19 do 20 n1 := from_integer(-1) 21 n2 := from_integer(0) 22 assert(n2 >= n1) 23 n1 := from_integer(1) 24 assert(n1 >= n2) 25 n1 := from_integer(Maximum_integer) 26 n1 := n1 @+ 1 27 n2 := from_integer(Maximum_integer) 28 assert(n1 >= n2) 29 n2 := n2 @+ 2 30 assert(n2 >= n1) 31 n1 := n1 @+ 1 32 assert(n2 >= n1) 33 n1 := from_integer(Minimum_integer) 34 n1 := n1 @- 1 35 n2 := from_integer(Minimum_integer) 36 assert(n2 >= n1) 37 n1 := from_string("2/5") 38 n2 := from_string("39/100") 39 assert(n1 >= n2) 40 n2 := from_string("-1/100") 41 assert(n1 >= n2) 42 n1 := from_string("-3/105") 43 assert(n1 <= n2) 44 n1 := from_integer(0) 45 assert(n2 <= n1) 46 n2 := from_string("0/54") 47 assert(n1 <= n2) 48 n1 := from_string("1/2") 49 n2 := from_string("9/18") 50 assert(n1 <= n2) 51 end 52 53 54 55end -- class TEST_NUMBER61 56-- 57-- ------------------------------------------------------------------------------------------------------------------------------ 58-- Copyright notice below. Please read. 59-- 60-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 61-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 62-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 63-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 64-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 65-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 66-- 67-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 68-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 69-- 70-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 71-- 72-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 73-- ------------------------------------------------------------------------------------------------------------------------------