From 902e225a83bf1f40c4d19d535ff2e3ff56fac834 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 4 Feb 2014 16:04:41 -0500 Subject: [PATCH] tests: really add nitunit test 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 --- tests/sav/nitunit_args1.res | 12 ++++++------ tests/test_nitunit.nit | 26 ++++++++++++++++++++++++++ tests/testfull.sh | 1 + 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 tests/test_nitunit.nit diff --git a/tests/sav/nitunit_args1.res b/tests/sav/nitunit_args1.res index eb930af..b37f396 100644 --- a/tests/sav/nitunit_args1.res +++ b/tests/sav/nitunit_args1.res @@ -1,10 +1,10 @@ -test_nitunit.nit:18,1--19,0: ERROR: test_nitunit.test_nitunit::X. (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. (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. - assert true - assert false + assert true + assert false assert undefined_identifier +"> assert undefined_identifier \ No newline at end of file +"> \ No newline at end of file diff --git a/tests/test_nitunit.nit b/tests/test_nitunit.nit new file mode 100644 index 0000000..4afd56d --- /dev/null +++ b/tests/test_nitunit.nit @@ -0,0 +1,26 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Copyright 2004-2008 Jean Privat +# +# 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 diff --git a/tests/testfull.sh b/tests/testfull.sh index 82eb5e4..a7af53c 100755 --- a/tests/testfull.sh +++ b/tests/testfull.sh @@ -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 -- 1.7.9.5