From 08232ef0e9687f7daa0e122fbe211df055456b72 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 10 Mar 2010 13:40:08 +0100 Subject: add some pip tests from the piplib distribution --- Makefile.am | 3 ++- pip_test.sh | 21 +++++++++++++++++++++ test_inputs/boulet.pip | 13 +++++++++++++ test_inputs/brisebarre.pip | 34 ++++++++++++++++++++++++++++++++++ test_inputs/cg1.pip | 15 +++++++++++++++ test_inputs/esced.pip | 27 +++++++++++++++++++++++++++ test_inputs/ex.pip | 9 +++++++++ test_inputs/ex2.pip | 9 +++++++++ test_inputs/fimmel.pip | 12 ++++++++++++ test_inputs/max.pip | 9 +++++++++ test_inputs/negative.pip | 9 +++++++++ test_inputs/small.pip | 9 +++++++++ test_inputs/sor1d.pip | 28 ++++++++++++++++++++++++++++ test_inputs/square.pip | 9 +++++++++ test_inputs/sven.pip | 7 +++++++ 15 files changed, 213 insertions(+), 1 deletion(-) create mode 100755 pip_test.sh create mode 100644 test_inputs/boulet.pip create mode 100644 test_inputs/brisebarre.pip create mode 100644 test_inputs/cg1.pip create mode 100644 test_inputs/esced.pip create mode 100644 test_inputs/ex.pip create mode 100644 test_inputs/ex2.pip create mode 100644 test_inputs/fimmel.pip create mode 100644 test_inputs/max.pip create mode 100644 test_inputs/negative.pip create mode 100644 test_inputs/small.pip create mode 100644 test_inputs/sor1d.pip create mode 100644 test_inputs/square.pip create mode 100644 test_inputs/sven.pip diff --git a/Makefile.am b/Makefile.am index 1688c95e..cac79592 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,7 @@ noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \ isl_polyhedron_minimize isl_polytope_scan \ isl_polyhedron_detect_equalities isl_cat \ isl_closure -TESTS = isl_test +TESTS = isl_test pip_test.sh if HAVE_PIPLIB ISL_PIPLIB = \ @@ -173,6 +173,7 @@ EXTRA_DIST = \ doc/mypod2latex \ doc/manual.tex \ doc/user.pod \ + pip_test.sh \ test_inputs dist-hook: diff --git a/pip_test.sh b/pip_test.sh new file mode 100755 index 00000000..2d97a352 --- /dev/null +++ b/pip_test.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +PIP_TESTS="\ + boulet.pip \ + brisebarre.pip \ + cg1.pip \ + esced.pip \ + ex2.pip \ + ex.pip \ + fimmel.pip \ + max.pip \ + negative.pip \ + small.pip \ + sor1d.pip \ + square.pip \ + sven.pip" + +for i in $PIP_TESTS; do + echo $i; + ./isl_pip$EXEEXT -T < $srcdir/test_inputs/$i || exit +done diff --git a/test_inputs/boulet.pip b/test_inputs/boulet.pip new file mode 100644 index 00000000..78e90ddf --- /dev/null +++ b/test_inputs/boulet.pip @@ -0,0 +1,13 @@ +0 3 + +-1 + +5 6 +1 1 -1 2 0 0 +1 0 1 1 4 20 +1 0 -1 -1 0 0 +1 0 1 -1 2 10 +1 0 -1 1 2 10 + +Urs_parms +Urs_unknowns diff --git a/test_inputs/brisebarre.pip b/test_inputs/brisebarre.pip new file mode 100644 index 00000000..5d25dae3 --- /dev/null +++ b/test_inputs/brisebarre.pip @@ -0,0 +1,34 @@ +# ---------------------- CONTEXT ---------------------- +1 2 +1 0 + +-1 + +# ----------------------- DOMAIN ---------------------- +26 6 +1 3 0 0 0 -98300 +1 -3 0 0 0 98308 +1 432 36 6 1 -14757611 +1 -432 -36 -6 -1 14758510 +1 54 9 3 1 -1923190 +1 -54 -9 -3 -1 1923303 +1 48 12 6 3 -1782238 +1 -48 -12 -6 -3 1782339 +1 27 9 6 4 -1045164 +1 -27 -9 -6 -4 1045221 +1 432 180 150 125 -17434139 +1 -432 -180 -150 -125 17435038 +1 6 3 3 3 -252443 +1 -6 -3 -3 -3 252456 +1 432 252 294 343 -18949275 +1 -432 -252 -294 -343 18950174 +1 27 18 24 32 -1234720 +1 -27 -18 -24 -32 1234777 +1 48 36 54 81 -2288453 +1 -48 -36 -54 -81 2288554 +1 54 45 75 125 -2684050 +1 -54 -45 -75 -125 2684163 +1 432 396 726 1331 -22386005 +1 -432 -396 -726 -1331 22386904 +1 3 3 6 12 -162072 +1 -3 -3 -6 -12 162080 diff --git a/test_inputs/cg1.pip b/test_inputs/cg1.pip new file mode 100644 index 00000000..78e31f18 --- /dev/null +++ b/test_inputs/cg1.pip @@ -0,0 +1,15 @@ +2 4 + 1 1 0 -1 + 1 -1 1 0 + +-1 + +8 7 + 1 0 1 0 -1 0 0 + 1 0 -1 0 1 0 0 + 1 1 0 0 0 -1 0 + 1 -1 0 0 0 1 0 + 1 0 1 0 0 0 -1 + 1 0 -1 0 0 1 0 + 1 0 -1 1 0 0 -1 + 1 0 0 -1 0 1 0 diff --git a/test_inputs/esced.pip b/test_inputs/esced.pip new file mode 100644 index 00000000..dbf56ffa --- /dev/null +++ b/test_inputs/esced.pip @@ -0,0 +1,27 @@ +0 2 + +-1 + +16 18 +1 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 + + +0 0 0 0 -1 0 0 0 0 1 -1 0 0 0 0 0 0 0 +0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 + +0 -1 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 + +0 0 0 0 0 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 +0 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 + +0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 +0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 + +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 +1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 diff --git a/test_inputs/ex.pip b/test_inputs/ex.pip new file mode 100644 index 00000000..a405450b --- /dev/null +++ b/test_inputs/ex.pip @@ -0,0 +1,9 @@ +1 5 +1 -1 1 1 0 + +-1 + +3 7 +1 0 -1 0 1 0 0 +1 -1 0 0 0 1 0 +1 1 1 -1 0 0 0 diff --git a/test_inputs/ex2.pip b/test_inputs/ex2.pip new file mode 100644 index 00000000..bb59848c --- /dev/null +++ b/test_inputs/ex2.pip @@ -0,0 +1,9 @@ +1 5 +1 -1 1 1 0 + +-1 + +3 7 +1 0 -1 0 1 0 0 +1 -1 0 0 0 1 0 +1 1 1 -1 0 0 0 diff --git a/test_inputs/fimmel.pip b/test_inputs/fimmel.pip new file mode 100644 index 00000000..a6dee417 --- /dev/null +++ b/test_inputs/fimmel.pip @@ -0,0 +1,12 @@ +0 4 + +-1 + +7 6 +1 2 6 0 0 -9 +1 5 -3 0 0 0 +1 2 -10 0 0 15 +1 -2 6 0 0 -3 +1 -2 -6 0 0 17 +1 0 1 -1 0 0 +1 1 0 0 -1 0 diff --git a/test_inputs/max.pip b/test_inputs/max.pip new file mode 100644 index 00000000..e8af57b9 --- /dev/null +++ b/test_inputs/max.pip @@ -0,0 +1,9 @@ +0 3 + +-1 + +4 5 +1 -1 0 1 0 +1 0 -1 1 0 +1 -1 3 -2 12 +1 2 -1 -1 3 diff --git a/test_inputs/negative.pip b/test_inputs/negative.pip new file mode 100644 index 00000000..45090a59 --- /dev/null +++ b/test_inputs/negative.pip @@ -0,0 +1,9 @@ +1 3 +# n 1 +1 1 -1 # n >= 1 +-1 + +2 4 +# i n 1 +1 1 0 1 # i >= -1 +1 -1 1 0 # i <= n diff --git a/test_inputs/small.pip b/test_inputs/small.pip new file mode 100644 index 00000000..59557d26 --- /dev/null +++ b/test_inputs/small.pip @@ -0,0 +1,9 @@ +0 2 + +-1 + +4 4 +1 1 0 0 +1 0 1 0 +1 1 -3 12 +1 -2 1 3 diff --git a/test_inputs/sor1d.pip b/test_inputs/sor1d.pip new file mode 100644 index 00000000..1bef89e5 --- /dev/null +++ b/test_inputs/sor1d.pip @@ -0,0 +1,28 @@ +2 4 + 1 1 0 0 + 1 0 1 0 + +-1 + +20 8 + + 0 -1 0 0 0 0 0 2 + 0 0 -1 0 0 0 0 1 + 0 0 0 -1 0 0 0 2 + 0 0 0 0 -1 0 0 4 + 1 0 0 0 1 0 0 -2 + 1 -2 0 2 1 0 0 -4 + 1 0 0 0 -1 0 1 -1 + 1 2 0 -2 -1 0 0 5 + 1 0 0 1 0 0 0 -1 + 1 0 -2 1 0 0 0 0 + 1 -2 0 2 0 0 1 -5 + 1 0 0 -1 0 1 0 0 + 1 0 2 -1 0 0 0 1 + 1 2 0 -2 0 0 0 3 + 1 0 1 0 0 0 0 0 + 1 -2 4 0 0 0 1 -3 + 1 0 -2 0 0 1 0 0 + 1 2 -4 0 0 0 0 3 + 1 2 0 0 0 0 0 1 + 1 -2 0 0 0 2 1 -5 diff --git a/test_inputs/square.pip b/test_inputs/square.pip new file mode 100644 index 00000000..7bb3f0c9 --- /dev/null +++ b/test_inputs/square.pip @@ -0,0 +1,9 @@ +0 3 + +-1 + +4 5 +1 1 0 0 0 +1 -1 0 1 0 +1 0 1 0 0 +1 0 -1 1 0 diff --git a/test_inputs/sven.pip b/test_inputs/sven.pip new file mode 100644 index 00000000..86027691 --- /dev/null +++ b/test_inputs/sven.pip @@ -0,0 +1,7 @@ +0 3 + +-1 + +2 3 +1 1 -4 +1 -1 10 -- cgit v1.2.3