tests: really add nitunit test
authorJean Privat <jean@pryen.org>
Tue, 4 Feb 2014 21:04:41 +0000 (16:04 -0500)
committerJean Privat <jean@pryen.org>
Wed, 5 Feb 2014 19:57:31 +0000 (14:57 -0500)
For some reason, 6380ab99c292 forgot to add `test_nitunit.nit`.
Since it also forgot to add nitunit to `testfull.sh`, the error was
unnoticed.

Change-Id: I48f579779955223fd65b68774af4b61e87ad31eb
Signed-off-by: Jean Privat <jean@pryen.org>

tests/sav/nitunit_args1.res
tests/test_nitunit.nit [new file with mode: 0644]
tests/testfull.sh

index eb930af..b37f396 100644 (file)
@@ -1,10 +1,10 @@
-test_nitunit.nit:18,1--19,0: ERROR: test_nitunit.test_nitunit::X.<class> (in .nitunit/test_nitunit2.nit): Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
+test_nitunit.nit:20,1--22,0: ERROR: test_nitunit.test_nitunit::X.<class> (in .nitunit/test_nitunit2.nit): Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
 
-test_nitunit.nit:20,2--21,0: FAILURE: test_nitunit.test_nitunit::X.test_nitunit::X::toto (in .nitunit/test_nitunit3.nit): .nitunit/test_nitunit3.nit:5,9--28: Error: Method or variable 'undefined_identifier' unknown in Sys.
+test_nitunit.nit:23,2--25,0: FAILURE: test_nitunit.test_nitunit::X.test_nitunit::X::toto (in .nitunit/test_nitunit3.nit): .nitunit/test_nitunit3.nit:5,9--28: Error: Method or variable 'undefined_identifier' unknown in Sys.
 
-<testsuites><testsuite package="test_nitunit"><testcase classname="test_nitunit.&lt;module&gt;" name="&lt;module&gt;"><system-err/><system-out> assert true
-</system-out></testcase><testcase classname="test_nitunit.test_nitunit::X" name="&lt;class&gt;"><system-err/><system-out> assert false
+<testsuites><testsuite package="test_nitunit"><testcase classname="test_nitunit.&lt;module&gt;" name="&lt;module&gt;"><system-err></system-err><system-out> assert true
+</system-out></testcase><testcase classname="test_nitunit.test_nitunit::X" name="&lt;class&gt;"><system-err></system-err><system-out> assert false
 </system-out><error message="Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
-"/></testcase><testcase classname="test_nitunit.test_nitunit::X" name="test_nitunit::X::toto"><system-err/><system-out> assert undefined_identifier
+"></error></testcase><testcase classname="test_nitunit.test_nitunit::X" name="test_nitunit::X::toto"><system-err></system-err><system-out> assert undefined_identifier
 </system-out><failure message=".nitunit/test_nitunit3.nit:5,9--28: Error: Method or variable 'undefined_identifier' unknown in Sys.
-"/></testcase></testsuite></testsuites>
\ No newline at end of file
+"></failure></testcase></testsuite></testsuites>
\ No newline at end of file
diff --git a/tests/test_nitunit.nit b/tests/test_nitunit.nit
new file mode 100644 (file)
index 0000000..4afd56d
--- /dev/null
@@ -0,0 +1,26 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2004-2008 Jean Privat <jean@pryen.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 'success' unit test (pass)
+#     assert true
+module test_nitunit
+# a 'error' unit test (do not pass)
+#     assert false
+class X
+       # a 'failure' unit test (does not compile)
+       #     assert undefined_identifier
+       fun toto do end
+end
index 82eb5e4..a7af53c 100755 (executable)
@@ -18,6 +18,7 @@ done
        ../src/nitmetrics.nit \
        ../src/nitg.nit \
        ../src/nitx.nit \
+       ../src/nitunit.nit \
        ../src/netdbg.nit \
        ../src/nitlight.nit \
        ../contrib/sort_downloads/src/sort_downloads.nit