update NOTICE and LICENSE
[nit.git] / tests / base_int.nit
index 5d9007c..cc452e4 100644 (file)
@@ -1,6 +1,6 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2005-2008 Jean Privat <jean@pryen.org>
+# Copyright 2009 Jean Privat <jean@pryen.org>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 
 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