[m-rev.] diff: fix some failing tests in the erlang grade
Julien Fischer
jfischer at opturion.com
Sun Feb 7 19:17:03 AEDT 2016
Fix some failing tests in the Erlang grade.
tests/warnings/Mmakefile:
Don't run the 'warn_return' test in the erlang grade;
it's test for something that isn't present in Erlang.
tests/warnings/singleton_test.exp4:
Update this expected ouptut -- the line nubmers in the
output have changed.
Julien.
diff --git a/tests/warnings/Mmakefile b/tests/warnings/Mmakefile
index ab1b250..1f2c68b 100644
--- a/tests/warnings/Mmakefile
+++ b/tests/warnings/Mmakefile
@@ -48,19 +48,29 @@ ERRORCHECK_PROGS = \
warn_non_contiguous \
warn_non_contiguous_foreign \
warn_non_contiguous_foreign_group \
- warn_return \
warn_self_import \
warn_succ_ind \
warn_stubs
# We don't yet pass (or even have a .exp file for) this test.
# trace_goal_dupl_defn
-
+#
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
ERRORCHECK_PROGS += unused_args_analysis
endif
-PROGS = $(COMPILE_PROGS) $(ERRORCHECK_PROGS) up_to_date
+# We don't run these tests in the erlang grade:
+#
+# warn_return (Erlang doesn't have return statements).
+#
+ifeq "$(filter erlang%,$(GRADE))" ""
+ NON_ERLANG_PROGS = \
+ warn_return
+else
+ NON_ERLANG_PROGS =
+endif
+
+PROGS = $(COMPILE_PROGS) $(ERRORCHECK_PROGS) $(NON_ERLANG_PROGS) up_to_date
TESTS = $(sort $(PROGS))
include $(TESTS_DIR)/Mmake.common
diff --git a/tests/warnings/singleton_test.exp4 b/tests/warnings/singleton_test.exp4
index e0a556c..bb26d3b 100644
--- a/tests/warnings/singleton_test.exp4
+++ b/tests/warnings/singleton_test.exp4
@@ -1,32 +1,32 @@
-singleton_test.m:008: In function `my_append_func'/2:
-singleton_test.m:008: warning: unresolved polymorphism.
-singleton_test.m:008: The variables with unbound types were:
-singleton_test.m:008: L2: V_1
-singleton_test.m:008: L1: V_1
-singleton_test.m:008: The unbound type variables will be implicitly bound to
-singleton_test.m:008: the builtin type `void'.
-singleton_test.m:026: In clause for predicate `singleton_test.my_append'/3:
-singleton_test.m:026: warning: variable `L2' occurs only once in this scope.
-singleton_test.m:030: In clause for function `singleton_test.my_append_func'/2:
-singleton_test.m:030: warning: variables `L1, L2' occur only once in this
-singleton_test.m:030: scope.
-singleton_test.m:031: In clause for function `singleton_test.my_append_func'/2:
-singleton_test.m:031: warning: variable `T' occurs only once in this scope.
-singleton_test.m:045: In the Erlang code for predicate
-singleton_test.m:045: `singleton_test.my_c_pred'/3:
-singleton_test.m:045: warning: variable `Y' does not occur in the Erlang
-singleton_test.m:045: code.
-singleton_test.m:062: In the Erlang code for function
-singleton_test.m:062: `singleton_test.my_c_func'/2:
-singleton_test.m:062: warning: variable `X' does not occur in the Erlang
-singleton_test.m:062: code.
-singleton_test.m:084: In the Erlang code for predicate
-singleton_test.m:084: `singleton_test.c_hello_world'/3:
-singleton_test.m:084: warning: variable `Msg' does not occur in the Erlang
-singleton_test.m:084: code.
-singleton_test.m:090: In clause for predicate `singleton_test.test_head'/6:
-singleton_test.m:090: warning: variable `_D' occurs more than once in this
-singleton_test.m:090: scope.
-singleton_test.m:090: In clause for predicate `singleton_test.test_head'/6:
-singleton_test.m:090: warning: variables `A, B' occur only once in this
-singleton_test.m:090: scope.
+singleton_test.m:013: In function `my_append_func'/2:
+singleton_test.m:013: warning: unresolved polymorphism.
+singleton_test.m:013: The variables with unbound types were:
+singleton_test.m:013: L2: V_1
+singleton_test.m:013: L1: V_1
+singleton_test.m:013: The unbound type variables will be implicitly bound to
+singleton_test.m:013: the builtin type `void'.
+singleton_test.m:031: In clause for predicate `singleton_test.my_append'/3:
+singleton_test.m:031: warning: variable `L2' occurs only once in this scope.
+singleton_test.m:035: In clause for function `singleton_test.my_append_func'/2:
+singleton_test.m:035: warning: variables `L1, L2' occur only once in this
+singleton_test.m:035: scope.
+singleton_test.m:036: In clause for function `singleton_test.my_append_func'/2:
+singleton_test.m:036: warning: variable `T' occurs only once in this scope.
+singleton_test.m:050: In the Erlang code for predicate
+singleton_test.m:050: `singleton_test.my_c_pred'/3:
+singleton_test.m:050: warning: variable `Y' does not occur in the Erlang
+singleton_test.m:050: code.
+singleton_test.m:067: In the Erlang code for function
+singleton_test.m:067: `singleton_test.my_c_func'/2:
+singleton_test.m:067: warning: variable `X' does not occur in the Erlang
+singleton_test.m:067: code.
+singleton_test.m:089: In the Erlang code for predicate
+singleton_test.m:089: `singleton_test.c_hello_world'/3:
+singleton_test.m:089: warning: variable `Msg' does not occur in the Erlang
+singleton_test.m:089: code.
+singleton_test.m:095: In clause for predicate `singleton_test.test_head'/6:
+singleton_test.m:095: warning: variable `_D' occurs more than once in this
+singleton_test.m:095: scope.
+singleton_test.m:095: In clause for predicate `singleton_test.test_head'/6:
+singleton_test.m:095: warning: variables `A, B' occur only once in this
+singleton_test.m:095: scope.
More information about the reviews
mailing list