aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/testsuite.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-30 18:51:53 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-01 00:55:44 +0100
commitdc27965726cbc506250ccc12c5169be048a01082 (patch)
tree31cc6bac1c7bd6084f7affacba281a2a7b5921c9 /validation/optim/testsuite.c
parent74ba40fadc42f7b3b2222cc231d2c38959943643 (diff)
downloadsparse-dev-dc27965726cbc506250ccc12c5169be048a01082.tar.gz
testsuite: add a new tag: check-output-returns
The current tags check-output-contains/excludes/pattern are quite powerful and the new check-output-match is easy to use but it can be even simpler. Indeed, a lot of IR simplifications/ canonicalizations can be tested by checking that the expression to be tested is equivalent to another one. This is less precise than some more specific tests but: * it's a big advantage because it's less sensitive to 'noise' like the exact number used by the pseudos or to the results of some new simplifications or canonicalizations * very often, this equivalence is what really matters and not the exact transformation. So, add a new utra-simple-to-use tag: just ask that all functions of the tests return the same specified value (usually 1): check-output-returns: <value> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/testsuite.c')
-rw-r--r--validation/optim/testsuite.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/validation/optim/testsuite.c b/validation/optim/testsuite.c
index 15c9bdd6..f4535522 100644
--- a/validation/optim/testsuite.c
+++ b/validation/optim/testsuite.c
@@ -9,4 +9,5 @@ int foo(void)
*
* check-output-ignore
* check-output-match(ret): \\$0
+ * check-output-returns: 0
*/