Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / bench_send.nit
index dcf2d9b..0937117 100644 (file)
@@ -16,7 +16,7 @@
 
 
 class A
-       readable writable var _val: Int = 0
+       var val: Int = 0
        fun hop(a: A, b: A, c: A)
        do
                if a.val > val then
@@ -44,8 +44,11 @@ class A
        end
        fun baz
        do
+               i += 1
        end
 
+       var i = 0
+
        init
        do
        end
@@ -97,7 +100,16 @@ b.val = 1
 c.val = 2
 d.val = 3
 var i = 0
-while i < 100000 do
+
+var n = 10
+if args.not_empty then n = args.first.to_i
+
+while i < 1 << n do
        a.hop(b, c, d)
        i = i + 1
 end
+
+print a.i
+print b.i
+print c.i
+print d.i