Merge remote-tracking branch 'upstream/master' into init_auto
[nit.git] / tests / TestNitsmells / NoAbstractImplemented / longparameterlist.nit
diff --git a/tests/TestNitsmells/NoAbstractImplemented/longparameterlist.nit b/tests/TestNitsmells/NoAbstractImplemented/longparameterlist.nit
new file mode 100644 (file)
index 0000000..ac93348
--- /dev/null
@@ -0,0 +1,48 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
+
+# A test program with a fake model to check model tools.
+module longparameterlist
+
+import platform
+
+class Starter
+       fun no_para do end
+
+       fun no_para2 do end
+
+       fun name: Int is abstract
+
+       fun name2: Int is abstract
+
+       var toto: Int is abstract
+end
+
+class NoImplemented
+       super Starter
+
+       fun short_list_parameter(numbers : Int, para1 : Bool, para2 : Float, para3 : Int) do
+               var starter = new Starter
+       end
+
+       fun long_list_parameter(numbers : Int, para1 : Bool, para2 : Float, para3 : Int, para4 : Starter) do
+               var starter = new Starter
+       end
+end
+
+class Implemented
+       super NoImplemented
+
+       redef fun name do return 1 end
+end