contrib: remove mnit_test
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 7 Jan 2018 14:26:33 +0000 (09:26 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 24 Jan 2018 18:03:14 +0000 (13:03 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

30 files changed:
contrib/mnit_test/Makefile [deleted file]
contrib/mnit_test/android/res/drawable-hdpi/icon.png [deleted file]
contrib/mnit_test/android/res/drawable-ldpi/icon.png [deleted file]
contrib/mnit_test/android/res/drawable-mdpi/icon.png [deleted file]
contrib/mnit_test/android/res/drawable-xhdpi/icon.png [deleted file]
contrib/mnit_test/android/res/drawable-xxhdpi/icon.png [deleted file]
contrib/mnit_test/android/res/drawable-xxxhdpi/icon.png [deleted file]
contrib/mnit_test/android/res/drawable/fighter.png [deleted file]
contrib/mnit_test/android/res/raw/testsound.ogg [deleted file]
contrib/mnit_test/android/res/raw/xylofon.ogg [deleted file]
contrib/mnit_test/android/res/values/bools.xml [deleted file]
contrib/mnit_test/android/res/values/dimens.xml [deleted file]
contrib/mnit_test/assets/fighter.png [deleted file]
contrib/mnit_test/assets/hello.txt [deleted file]
contrib/mnit_test/assets/testsound.ogg [deleted file]
contrib/mnit_test/assets/xylofon.ogg [deleted file]
contrib/mnit_test/org.nitlanguage.test_all.txt [deleted file]
contrib/mnit_test/org.nitlanguage.test_minimal.txt [deleted file]
contrib/mnit_test/package.ini [deleted file]
contrib/mnit_test/src/complete_simple_android.nit [deleted file]
contrib/mnit_test/src/simple.nit [deleted file]
contrib/mnit_test/src/simple_android.nit [deleted file]
contrib/mnit_test/src/simple_linux.nit [deleted file]
contrib/mnit_test/src/test_assets_and_resources.nit [deleted file]
contrib/mnit_test/src/test_audio.nit [deleted file]
contrib/mnit_test/src/test_bundle.nit [deleted file]
contrib/mnit_test/src/test_data_store.nit [deleted file]
contrib/mnit_test/src/test_intent.nit [deleted file]
contrib/mnit_test/src/test_shared_preferences.nit [deleted file]
contrib/mnit_test/src/test_target_api.nit [deleted file]

diff --git a/contrib/mnit_test/Makefile b/contrib/mnit_test/Makefile
deleted file mode 100644 (file)
index 73bff6b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-default: linux
-
-linux:
-       mkdir -p bin
-       nitc -o bin/simple src/simple_linux.nit
-
-android:
-       mkdir -p bin
-       nitc -o bin/complete.apk src/complete_simple_android.nit --semi-global
-       nitc -o bin/minimal.apk src/simple_android.nit --semi-global
-
-android-release:
-       mkdir -p bin
-       nitc -o bin/complete.apk src/complete_simple_android.nit --semi-global --release
-       nitc -o bin/minimal.apk src/simple_android.nit --semi-global --release
-
-clean:
-       rm -rf bin
diff --git a/contrib/mnit_test/android/res/drawable-hdpi/icon.png b/contrib/mnit_test/android/res/drawable-hdpi/icon.png
deleted file mode 100644 (file)
index bad7e3d..0000000
Binary files a/contrib/mnit_test/android/res/drawable-hdpi/icon.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/drawable-ldpi/icon.png b/contrib/mnit_test/android/res/drawable-ldpi/icon.png
deleted file mode 100644 (file)
index a3b27f8..0000000
Binary files a/contrib/mnit_test/android/res/drawable-ldpi/icon.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/drawable-mdpi/icon.png b/contrib/mnit_test/android/res/drawable-mdpi/icon.png
deleted file mode 100644 (file)
index fbe3f94..0000000
Binary files a/contrib/mnit_test/android/res/drawable-mdpi/icon.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/drawable-xhdpi/icon.png b/contrib/mnit_test/android/res/drawable-xhdpi/icon.png
deleted file mode 100644 (file)
index 06ea6ff..0000000
Binary files a/contrib/mnit_test/android/res/drawable-xhdpi/icon.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/drawable-xxhdpi/icon.png b/contrib/mnit_test/android/res/drawable-xxhdpi/icon.png
deleted file mode 100644 (file)
index eedddef..0000000
Binary files a/contrib/mnit_test/android/res/drawable-xxhdpi/icon.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/drawable-xxxhdpi/icon.png b/contrib/mnit_test/android/res/drawable-xxxhdpi/icon.png
deleted file mode 100644 (file)
index 08287da..0000000
Binary files a/contrib/mnit_test/android/res/drawable-xxxhdpi/icon.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/drawable/fighter.png b/contrib/mnit_test/android/res/drawable/fighter.png
deleted file mode 100644 (file)
index de25557..0000000
Binary files a/contrib/mnit_test/android/res/drawable/fighter.png and /dev/null differ
diff --git a/contrib/mnit_test/android/res/raw/testsound.ogg b/contrib/mnit_test/android/res/raw/testsound.ogg
deleted file mode 100644 (file)
index 60c707e..0000000
Binary files a/contrib/mnit_test/android/res/raw/testsound.ogg and /dev/null differ
diff --git a/contrib/mnit_test/android/res/raw/xylofon.ogg b/contrib/mnit_test/android/res/raw/xylofon.ogg
deleted file mode 100644 (file)
index c4bf4fd..0000000
Binary files a/contrib/mnit_test/android/res/raw/xylofon.ogg and /dev/null differ
diff --git a/contrib/mnit_test/android/res/values/bools.xml b/contrib/mnit_test/android/res/values/bools.xml
deleted file mode 100644 (file)
index 2b1f0d6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <bool name="test_bool">true</bool>
-</resources>
\ No newline at end of file
diff --git a/contrib/mnit_test/android/res/values/dimens.xml b/contrib/mnit_test/android/res/values/dimens.xml
deleted file mode 100644 (file)
index fa1d020..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <dimen name="test_dimen_1">25px</dimen>
-    <dimen name="test_dimen_2">150px</dimen>
-</resources>
diff --git a/contrib/mnit_test/assets/fighter.png b/contrib/mnit_test/assets/fighter.png
deleted file mode 100644 (file)
index de25557..0000000
Binary files a/contrib/mnit_test/assets/fighter.png and /dev/null differ
diff --git a/contrib/mnit_test/assets/hello.txt b/contrib/mnit_test/assets/hello.txt
deleted file mode 100644 (file)
index 7214097..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-hello world
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.
diff --git a/contrib/mnit_test/assets/testsound.ogg b/contrib/mnit_test/assets/testsound.ogg
deleted file mode 100644 (file)
index 60c707e..0000000
Binary files a/contrib/mnit_test/assets/testsound.ogg and /dev/null differ
diff --git a/contrib/mnit_test/assets/xylofon.ogg b/contrib/mnit_test/assets/xylofon.ogg
deleted file mode 100644 (file)
index c4bf4fd..0000000
Binary files a/contrib/mnit_test/assets/xylofon.ogg and /dev/null differ
diff --git a/contrib/mnit_test/org.nitlanguage.test_all.txt b/contrib/mnit_test/org.nitlanguage.test_all.txt
deleted file mode 100644 (file)
index d6be0fd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Categories:Nit
-License:Apache2
-Web Site:http://nitlanguage.org
-Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/contrib/mnit_test
-Issue Tracker:https://github.com/nitlang/nit/issues
-
-Summary:Simple Demo for MNit
-Description:
-A useless application that test various API usage of the mnit framework on Android.
-.
diff --git a/contrib/mnit_test/org.nitlanguage.test_minimal.txt b/contrib/mnit_test/org.nitlanguage.test_minimal.txt
deleted file mode 100644 (file)
index 9f3bb3c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Categories:Nit
-License:Apache2
-Web Site:http://nitlanguage.org
-Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/contrib/mnit_test
-Issue Tracker:https://github.com/nitlang/nit/issues
-
-Summary:Minimal Demo for MNit
-Description:
-A useless application that test various basic API usage of the mnit framework on Android.
-.
diff --git a/contrib/mnit_test/package.ini b/contrib/mnit_test/package.ini
deleted file mode 100644 (file)
index 5247640..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-[package]
-name=mnit_test
-tags=testing
-maintainer=Alexis Laferrière <alexis.laf@xymus.net>
-license=Apache-2.0
-[upstream]
-browse=https://github.com/nitlang/nit/tree/master/examples/mnit_simple/
-git=https://github.com/nitlang/nit.git
-git.directory=examples/mnit_simple/
-homepage=http://nitlanguage.org
-issues=https://github.com/nitlang/nit/issues
-apk=http://nitlanguage.org/fdroid/apk/test_all.apk
diff --git a/contrib/mnit_test/src/complete_simple_android.nit b/contrib/mnit_test/src/complete_simple_android.nit
deleted file mode 100644 (file)
index b2d9975..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Entrypoint of an app with all the mnit tests for Android
-module complete_simple_android is
-       app_name "mnit Complete"
-       app_namespace "org.nitlanguage.test_all"
-       android_api_target 19
-end
-
-import test_bundle
-import test_audio
-import test_shared_preferences
-import test_assets_and_resources
-import test_target_api
-import test_data_store
-import test_intent
diff --git a/contrib/mnit_test/src/simple.nit b/contrib/mnit_test/src/simple.nit
deleted file mode 100644 (file)
index 07dd3a3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012-2013 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Very simple application
-module simple is
-       app_name "mnit Minimal"
-       app_version(0, 2, git_revision)
-end
-
-import mnit
-
-redef class App
-
-       var img : nullable I = null
-
-       redef fun on_create
-       do
-               super
-
-               var txt = load_asset( "hello.txt" )
-               if txt isa String then
-                       print txt.length
-                       print txt
-               end
-
-               img = load_image( "fighter.png" )
-       end
-
-       var r = 0.0 is writable
-       var g = 0.0 is writable
-       var b = 0.0 is writable
-       redef fun frame_core( display )
-       do
-               b = b + 0.01
-               if b > 1.0 then b = 0.0
-
-               display.clear( r, g, b )
-
-               var img = self.img
-               if img != null then
-                       display.blit( img, 100, 100 )
-               end
-       end
-
-       redef fun input( ie )
-       do
-               if ie isa QuitEvent then
-                       quit = true
-                       return true
-               else if ie isa PointerEvent then
-                       r = ie.x/display.width.to_f
-                       g = ie.y/display.height.to_f
-                       return true
-               else
-                       print "unknown input: {ie}"
-                       return false
-               end
-       end
-end
diff --git a/contrib/mnit_test/src/simple_android.nit b/contrib/mnit_test/src/simple_android.nit
deleted file mode 100644 (file)
index 6e237d6..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012-2014 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module simple_android is
-       app_namespace "org.nitlanguage.test_minimal"
-       android_manifest """<uses-permission android:name="android.permission.VIBRATE" />"""
-end
-
-import mnit::android
-import android::portrait
-import serialization
-
-import simple
-
-in "Java" `{
-       import android.content.Context;
-       import android.widget.Toast;
-`}
-
-redef class App
-       redef fun input( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       test_java_ffi
-               end
-               return super
-       end
-
-       fun test_java_ffi import native_activity in "Java" `{
-               // + Log (no context needed)
-               android.util.Log.d("mnit_simple", "Java within NIT!!!");
-
-               // - Context needed from now on
-               final android.app.Activity context = App_native_activity(self);
-
-               // Vibration
-               android.os.Vibrator v = (android.os.Vibrator)
-                       context.getSystemService(android.content.Context.VIBRATOR_SERVICE);
-               v.vibrate(500);
-
-               // - UI thread needed from now on
-               context.runOnUiThread(new Runnable() {
-                       @Override
-                       public void run()  {
-                               // + Toast
-                               CharSequence text = "Java within Nit!";
-                               int duration = Toast.LENGTH_SHORT;
-                               Toast toast = Toast.makeText(context, text, duration);
-                               toast.show();
-                       }
-               });
-       `}
-end
-
-class Point
-       auto_serializable
-
-       var x: Int
-       var y: Int
-
-       init(x, y: Int)
-       do
-               self.x = x
-               self.y = y
-       end
-
-       redef fun to_s do return "({x}, {y})"
-end
diff --git a/contrib/mnit_test/src/simple_linux.nit b/contrib/mnit_test/src/simple_linux.nit
deleted file mode 100644 (file)
index 1ff4235..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012-2013 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module simple_linux
-
-import simple
-import mnit::linux
-
-import test_data_store
-
-super
diff --git a/contrib/mnit_test/src/test_assets_and_resources.nit b/contrib/mnit_test/src/test_assets_and_resources.nit
deleted file mode 100644 (file)
index 5e7cbd7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Romain Chanoir <romain.chanoir@viacesi.fr>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the asserts_and_resources module of App.nit framework
-module test_assets_and_resources
-
-import simple_android
-intrude import android::assets_and_resources
-
-redef class App
-       redef fun input( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       test_assets
-                       test_resources
-               end
-               return super
-       end
-
-       # Testing the assets manager
-       fun test_assets
-       do
-               assert not asset_manager.open_fd("testsound.ogg").is_java_null
-       end
-
-       # Testing the resources manager
-       fun test_resources do
-               # FIXME test deactivated to use app_name which is incompatible
-               # with a custom res/values/strings.xml
-               #assert resource_manager.string("string_test") == "string test"
-
-               assert resource_manager.boolean("test_bool") == true
-               assert resource_manager.dimension("test_dimen_1") == 25
-               assert resource_manager.dimension("test_dimen_2") == 150
-       end
-end
diff --git a/contrib/mnit_test/src/test_audio.nit b/contrib/mnit_test/src/test_audio.nit
deleted file mode 100644 (file)
index ae94e70..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Romain Chanoir <romain.chanoir@viacesi.fr>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the audio module of App.nit framework
-module test_audio
-
-import simple_android
-import android::audio
-
-redef class App
-       # Sound
-       var soundsp: Sound is noinit
-
-       # Music
-       var soundmp: Music is noinit
-
-       # Sound
-       var easy_soundsp = new Sound("testsound")
-
-       # Music
-       var easy_soundmp = new Music("xylofon")
-
-       # Read sounds from the assets folder?
-       var test_assets = false
-
-       # Read sounds from the resources folder?
-       var test_ressources = true
-
-       # Test the automatic way with `PlayableAudio::load`?
-       var test_easy_sounds = false
-
-       redef fun on_create
-       do
-               super
-               default_mediaplayer.looping = true
-               if test_assets then
-                       soundsp = new Sound("testsound.og")
-                       soundmp = new Music("xylofon.og")
-                       soundmp.play
-               end
-               if test_ressources then
-                       soundsp = load_sound_from_res("testsound")
-                       soundmp = load_music_from_res("xylofon")
-                       soundmp.play
-               end
-               if test_easy_sounds then
-                       easy_soundsp.load
-                       easy_soundmp.load
-                       easy_soundmp.play
-               end
-       end
-
-       redef fun input( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       if test_assets or test_ressources then
-                               soundsp.play
-                       else if test_easy_sounds then
-                               easy_soundsp.play
-                       end
-               end
-               return super
-       end
-end
diff --git a/contrib/mnit_test/src/test_bundle.nit b/contrib/mnit_test/src/test_bundle.nit
deleted file mode 100644 (file)
index a821dce..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the bundle module of App.nit framework
-module test_bundle
-
-import simple_android
-import android::bundle
-
-redef class App
-       redef fun input ( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       test_bundle
-               end
-               return super
-       end
-
-       fun test_bundle
-       do
-               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]
-
-               var value = true
-
-               for i in [0..5] do
-                       int_array.add(i)
-                       bool_array.add(value)
-                       value = not value
-               end
-
-               bundle["anArrayOfInt"] = int_array
-               bundle["anArrayOfBool"] = bool_array
-
-               assert bundle.int("anInt", 0) == 1
-               assert bundle.int("wrongInt", 0) == 0
-               assert bundle.float("aFloat", 0.0) == 1.1
-               assert bundle.float("wrongFloat", 0.0) == 0.0
-               assert bundle.string("aString") == "A string"
-               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")
-
-               value = true
-
-               for i in [0..5] do
-                       assert int_array_test[i] == i
-                       assert bool_array_test[i] == value
-                       value = not value
-               end
-
-               assert bundle.size == 6
-               assert bundle.has("aBool")
-               assert not bundle.is_empty
-
-               bundle.remove("aString")
-               bundle.remove("anArrayOfBool")
-
-               assert bundle.string("aString") == null
-               assert bundle.array_of_bool("anArrayOfBool") == null
-
-               # Serializable tests
-               var p1 = new Point(10, 10)
-               bundle["aPoint"] = p1
-               var p2 = bundle.deserialize("aPoint")
-
-               assert p1.to_s == p2.to_s
-
-               var point_array = new Array[Point]
-
-               for i in [0..5] do point_array.add(new Point(i, i))
-
-               bundle["anArrayOfPoint"] = point_array
-
-               var deserialized_point_array = bundle.deserialize_array("anArrayOfPoint")
-
-               for i in [0..5] do
-                       var point = new Point(i, i)
-                       assert deserialized_point_array[i].to_s == point.to_s
-               end
-
-               bundle.clear
-
-               assert bundle.keys.is_empty
-               assert bundle.is_empty
-       end
-end
diff --git a/contrib/mnit_test/src/test_data_store.nit b/contrib/mnit_test/src/test_data_store.nit
deleted file mode 100644 (file)
index 03b2eef..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the shared_preferences module of App.nit framework
-module test_data_store
-
-import simple
-import app::data_store
-
-redef class App
-       redef fun on_create
-       do
-               super
-
-               # load colors from data store
-               var r = data_store["r"]
-               if r isa Float then
-                       self.r = r
-                       print "r {r}"
-               else assert r == null
-
-               var g = data_store["g"]
-               if g isa Float then
-                       self.g = g
-                       print "g {g}"
-               else assert g == null
-       end
-
-       redef fun input(ie)
-       do
-               if ie isa PointerEvent then
-                       # save color for next execution
-                       data_store["r"] = r
-                       data_store["g"] = g
-               end
-
-               return super
-       end
-end
diff --git a/contrib/mnit_test/src/test_intent.nit b/contrib/mnit_test/src/test_intent.nit
deleted file mode 100644 (file)
index 90af8a2..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the intent module of App.nit framework
-module test_intent
-
-import simple_android
-import android::intent::intent_api19
-
-redef class App
-       var intent: Intent
-       redef fun input( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       test_intent
-               end
-               return super
-       end
-
-       fun test_intent
-       do
-               intent = new Intent
-               intent.action = intent_action.view.to_s
-               intent.data   = "content://contacts/people/"
-
-               start_activity intent
-               intent.destroy
-
-               intent = new Intent
-               var p1 = new Point(10, 20)
-               intent["a_point"] = p1
-               var p2 = intent["a_point"]
-               assert p1.to_s == p2.to_s
-
-               intent.action = intent_action.main.to_s
-               assert intent.action == intent_action.main.to_s
-
-               intent.add_flags intent_flag.activity_brought_to_front
-               assert intent.flags == intent_flag.activity_brought_to_front
-
-               var bool_array = new Array[Bool]
-               for i in [0..5] do bool_array.add( i % 2 == 0 )
-
-               intent.add_extra_array_of_bool("bools", bool_array)
-               var bool_array2 = intent.extra_bool_array("bools")
-               for i in [0..5] do assert bool_array2[i] == (i%2 ==0)
-
-               var string_array = ["foo", "bar", "baz"]
-               intent.add_extra_array_of_string("strings", string_array)
-               var string_array2 = intent.extra_string_array("strings")
-               for i in [0..string_array2.length[ do assert string_array[i] == string_array2[i]
-
-               intent.add_extra_array_list_of_string("strings", string_array)
-               string_array2 = intent.extra_string_array_list("strings")
-               for i in [0..string_array2.length[ do assert string_array[i] == string_array2[i]
-
-               intent.add_category intent_category.home.to_s
-               var categories = intent.categories
-               assert categories.first == intent_category.home.to_s
-               assert intent.has_category(intent_category.home.to_s)
-
-               intent.destroy
-       end
-end
diff --git a/contrib/mnit_test/src/test_shared_preferences.nit b/contrib/mnit_test/src/test_shared_preferences.nit
deleted file mode 100644 (file)
index ec0b607..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the shared_preferences module of App.nit framework
-module test_shared_preferences
-
-import simple_android
-import android::shared_preferences
-
-redef class App
-       redef fun input ( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       test_shared_preferences
-               end
-               return super
-       end
-
-       fun test_shared_preferences
-       do
-               # Private mode tests
-               var sp = new SharedPreferences.privately(self, "test")
-               sp.add_bool("a_boolean",  true)
-               sp.add_float("a_float", 66.6)
-               sp.add_int("an_int", 666)
-               sp.add_int("a_second_int", 666777)
-               sp.add_long("a_long", 6666666666)
-               sp.add_string("a_string", "A string")
-               sp["another_int"] = 85
-               sp["yet_another_string"] = "Another string"
-               sp.remove("a_second_int")
-
-               # Serialized object test
-               var my_point = new Point(10, 10)
-               sp["a_point"] = my_point
-               var my_deserialized_point = sp["a_point"]
-               assert my_point.to_s == my_deserialized_point.to_s
-
-               assert sp.bool("a_boolean", false) == true
-               assert sp.bool("wrong_boolean", false) == false
-               assert sp.float("a_float", 0.0) != 0.0
-               assert sp.float("wrong_float", 0.0) == 0.0
-               assert sp.int("an_int", 0) == 666
-               assert sp.int("a_second_int", 0) == 0
-
-               # FIXME getting long from Java on Android is broken
-               # The C FFI (underlying the Java FFI) version of Int is a `long` which is on 32 bits on Android.
-               #assert sp.long("a_long", 0) == 6666666666
-
-               assert sp.long("wrong_long", 0) == 0
-               assert sp.string("a_string", "ERROR!") == "A string"
-               assert sp.string("wrong_string", "ERROR!") == "ERROR!"
-               assert sp["another_int"] == 85
-               assert sp["yet_another_string"] == "Another string"
-               assert sp.has("an_int") == true
-               assert sp.has("a_second_int") == false
-
-               sp.clear
-               assert sp.all == null
-
-               sp.destroy
-       end
-end
diff --git a/contrib/mnit_test/src/test_target_api.nit b/contrib/mnit_test/src/test_target_api.nit
deleted file mode 100644 (file)
index f092da3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Test for the API level related annotations
-module test_target_api is
-       android_api_min 10
-       android_api_max 19
-end
-
-import simple_android
-#FIXME: Double quad to access lib/foo/goo/bar.nit is evil
-import android::shared_preferences::shared_preferences_api11
-
-redef class App
-       redef fun input( ie )
-       do
-               if ie isa PointerEvent and ie.depressed then
-                       test_target_api
-               end
-               return super
-       end
-
-       fun test_target_api
-       do
-               var hash_set = new HashSet[JavaString]
-               hash_set.add "foo".to_java_string
-               hash_set.add "bar".to_java_string
-
-               shared_preferences.add_string_set("test", hash_set)
-
-               var hash_set2 = shared_preferences.string_set("test")
-
-               var tab = ["foo", "bar"]
-               var i = 0
-
-               for entry in hash_set2 do
-                       assert entry == tab[i].to_java_string
-                       i+=1
-               end
-
-       end
-end