From 1009f068ea6adc6877bf6a58a7b07e08a1ab9f93 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sun, 5 Sep 2010 05:45:36 +0100 Subject: [PATCH] New test "ignorearray", for the IGNORE/array interaction This one's needed because it catches potential issues with attempting to pass booleans to a varargs function, at least with the current code. --- pit/CATALOG | 1 + pit/Makefile | 6 ++++-- pit/tests/ignorearray.chk | 12 ++++++++++++ pit/tests/ignorearray.i | 14 ++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 pit/tests/ignorearray.chk create mode 100644 pit/tests/ignorearray.i diff --git a/pit/CATALOG b/pit/CATALOG index f0c4857..a01b1b4 100644 --- a/pit/CATALOG +++ b/pit/CATALOG @@ -138,6 +138,7 @@ by Alex Smith tests/permute.doc Information about the permutation-printer tests/whileadd.i + Adds two input numbers with a single WHILE statement tests/ignorret.i + Testing interactions of IGNORE and RETRIEVE + tests/ignorearray.i + Checking that IGNORE works correctly on arrays tests/ignorret.doc What ignorret does on several compilers tests/normaldist.i Checking the standard deviation of (1910) tests/testcreate.i + A test for the CREATE statement diff --git a/pit/Makefile b/pit/Makefile index 01f25a1..d15c227 100644 --- a/pit/Makefile +++ b/pit/Makefile @@ -44,7 +44,8 @@ BASE2SOURCES = \ $(PIT)/tests/ais2.i \ $(PIT)/tests/compucome.i \ $(PIT)/tests/hello.i \ - $(PIT)/tests/ignorret \ + $(PIT)/tests/ignorret.i \ + $(PIT)/tests/ignorearray.i \ $(PIT)/tests/iogerunds.i \ $(PIT)/tests/limits.i \ $(PIT)/tests/permute.i \ @@ -57,7 +58,7 @@ BASE2SOURCES = \ $(PIT)/tests/testcf.i \ $(PIT)/tests/testcreate .i \ $(PIT)/tests/testlib2.i \ - $(PIT)/tests/testonce \ + $(PIT)/tests/testonce.i \ $(PIT)/tests/testsplat.i \ $(PIT)/tests/whileadd.i \ $(PIT)/tpk.i \ @@ -124,6 +125,7 @@ test: $(TARGETS) @cat $(PIT)/tests/ais2.tst | $(PIT)/tests/ais2 | $(PIT)/regresscheck $(PIT)/tests/ais2 @$(PIT)/tests/count | $(PIT)/regresscheck $(PIT)/tests/count @$(PIT)/tests/hello | $(PIT)/regresscheck $(PIT)/tests/hello + @$(PIT)/tests/ignorearray | $(PIT)/regresscheck $(PIT)/tests/ignorearray @$(PIT)/tests/ignorret | $(PIT)/regresscheck $(PIT)/tests/ignorret @$(PIT)/tests/permute | $(PIT)/regresscheck $(PIT)/tests/permute @$(PIT)/tests/sink 2>&1 | $(PIT)/regresscheck $(PIT)/tests/sink diff --git a/pit/tests/ignorearray.chk b/pit/tests/ignorearray.chk new file mode 100644 index 0000000..c16360e --- /dev/null +++ b/pit/tests/ignorearray.chk @@ -0,0 +1,12 @@ + +I + +II + +III + +I + +V + +III diff --git a/pit/tests/ignorearray.i b/pit/tests/ignorearray.i new file mode 100644 index 0000000..7275e98 --- /dev/null +++ b/pit/tests/ignorearray.i @@ -0,0 +1,14 @@ + DO ;1 <- #3 + PLEASE DO ;1 SUB #1 <- #1 + DO ;1 SUB #2 <- #2 + DO ;1 SUB #3 <- #3 + PLEASE DO READ OUT ;1 SUB #1 + ;1 SUB #2 + ;1 SUB #3 + DO IGNORE ;1 + DO ;1 SUB #1 <- #4 + DO REMEMBER ;1 + DO ;1 SUB #2 <- #5 + DO IGNORE ;1 + DO ;1 SUB #3 <- #6 + DO READ OUT ;1 SUB #1 + ;1 SUB #2 + ;1 SUB #3 + PLEASE GIVE UP + -- 2.43.0