X-Git-Url: http://nitlanguage.org diff --git a/tests/base_int.nit b/tests/base_int.nit index 5d9007c..cc452e4 100644 --- a/tests/base_int.nit +++ b/tests/base_int.nit @@ -1,6 +1,6 @@ # This file is part of NIT ( http://www.nitlanguage.org ). # -# Copyright 2005-2008 Jean Privat +# Copyright 2009 Jean Privat # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,15 +16,58 @@ import kernel -redef class Object - fun printn(a: Object) - do - if a == null then - 'n'.output - else - a.output - end - end -end - -printn(1) +(-(1)).output +(2+3).output +(2-3).output +(2*3).output +(2/3).output +(2%3).output +'\n'.output + +(3+2).output +(3-2).output +(3*2).output +(3/2).output +(3%2).output +'\n'.output + +(not 1==2).output +(2==2).output +'\n'.output + +(not 1 is 2).output +(2 is 2).output +'\n'.output + +(not 1>2).output +(not 2>2).output +(3>2).output +'\n'.output + +(not 1>=2).output +(2>=2).output +(3>=2).output +'\n'.output + +(1<2).output +(not 2<2).output +(not 3<2).output +'\n'.output + +(1<=2).output +(2<=2).output +(not 3<=2).output +'\n'.output + +(not 1>=2).output +(2>=2).output +(3>=2).output +'\n'.output + +(1<=>2).output +(2<=>2).output +(3<=>2).output +'\n'.output + +1.succ.output +3.prec.output