lib/android: Bundle do not need a context or to import native_app_glue
[nit.git] / examples / mnit_simple / src / test_bundle.nit
index 5bfc8d2..37c79bb 100644 (file)
@@ -31,13 +31,13 @@ redef class App
 
        fun test_bundle
        do
-               var bundle = new Bundle(self)
-                
+               var bundle = new Bundle
+
                bundle["anInt"] = 1
                bundle["aFloat"] = 1.1
                bundle["aString"] = "A string"
                bundle["aBool"] = true
-               
+
                var int_array = new Array[Int]
                var bool_array = new Array[Bool]
 
@@ -60,7 +60,7 @@ redef class App
                assert bundle.string("wrongString") == null
                assert bundle.bool("aBool", false)
                assert bundle.bool("wrongBool", false) == false
-               
+
                var int_array_test = bundle.array_of_int("anArrayOfInt")
                var bool_array_test = bundle.array_of_bool("anArrayOfBool")
 
@@ -71,7 +71,7 @@ redef class App
                        assert bool_array_test[i] == value
                        value = not value
                end
-               
+
                assert bundle.size == 6
                assert bundle.has("aBool")
                assert not bundle.is_empty
@@ -97,7 +97,7 @@ redef class App
 
                var deserialized_point_array = bundle.deserialize_array("anArrayOfPoint")
 
-               for i in [0..5] do 
+               for i in [0..5] do
                        var point = new Point(i, i)
                        assert deserialized_point_array[i].to_s == point.to_s
                end