tests: Fix tests
[nit.git] / tests / base_attr_nullable.nit
index c8ea25c..112f86b 100644 (file)
@@ -18,28 +18,27 @@ import end
 
 interface Object
 end
-
-universal Int
-       meth output is intern
-       meth +(o: Int): Int is intern
+enum Bool end
+enum Int
+       fun output is intern
+       fun +(o: Int): Int is intern
 end
 
 class Integer
-       readable writable attr _val: Int
-       init(val: Int) do _val = val
-       meth output do _val.output
+       var val: Int
+       fun output do _val.output
 end
 
 class Foo
-       attr _a1: Integer
-       readable attr _a2: Integer
-       meth run
+       var a1: Integer is noinit
+       var a2: Integer is noinit
+       fun run
        do
                _a1.output
-               a2.output
+               _a2.output
        end
 
-       meth run_other(o: Foo)
+       fun run_other(o: Foo)
        do
                o._a1.output
                o._a2.output
@@ -50,16 +49,16 @@ class Foo
                #alt1#run
                _a1 = new Integer(1)
                #alt2#run
-               _a2 = new Integer(_a1.val + 1)
+               _a2 = new Integer(_a1._val + 1)
        end
 
        init nop do end
 end
 
 class Bar
-special Foo
-       attr _a3: Integer
-       redef meth run
+       super Foo
+       var a3: Integer is noinit
+       redef fun run
        do
                _a1.output
                _a2.output
@@ -68,7 +67,7 @@ special Foo
 
        init
        do
-               nop
+               if false then super # no auto super init call
                #alt3#run
                _a1 = new Integer(10)
                #alt4#run_other(self)