From 0d6e06607bce84304098599f6eb6147fd2e61e44 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 25 Jan 2008 11:19:58 +0000 Subject: [PATCH] Added a couple more tests --- testcases/automatic/usage-check-2.occ.test | 4 ++++ transformations/ArrayUsageCheckTest.hs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/testcases/automatic/usage-check-2.occ.test b/testcases/automatic/usage-check-2.occ.test index 889aa4e..ae9dfe5 100644 --- a/testcases/automatic/usage-check-2.occ.test +++ b/testcases/automatic/usage-check-2.occ.test @@ -24,6 +24,10 @@ PROC m() a[i] := 2 a[i] := 2 +%FAIL Replicated index, twice, slightly different + a[i] := 2 + a[i + 1] := 2 + %PASS Replicated index plus one a[i + 1] := 2 diff --git a/transformations/ArrayUsageCheckTest.hs b/transformations/ArrayUsageCheckTest.hs index b1fc724..89130c9 100644 --- a/transformations/ArrayUsageCheckTest.hs +++ b/transformations/ArrayUsageCheckTest.hs @@ -352,6 +352,10 @@ testMakeEquations = TestList leq [con 0, i, con 7] &&& leq [con 0,i ++ con 1, con 7])] ,[(variable "i", intLiteral 1, intLiteral 6)],[exprVariable "i", buildExpr $ Dy (Var "i") A.Add (Lit $ intLiteral 1)],intLiteral 8) + -- Only a constant: + ,testRep (210,[(rep_i_mapping,[con 4 === con 4],concat $ replicate 2 $ leq [con 0, con 4, con 7])] + ,[(variable "i", intLiteral 1, intLiteral 6)],[intLiteral 4],intLiteral 8) + ] where test :: (Integer,[(VarMap,[HandyEq],[HandyIneq])],[A.Expression],A.Expression) -> Test