summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 14:11:32 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 14:11:32 -0400
commitfd1a963a81327f7b6a20a0f2ac131d2525649400 (patch)
tree053aee5bbd985b79f0d1901bc4fb72a44d48c4aa /tests
parente52d6c0bc6e2e911515d21c6acc1e311a8e30db9 (diff)
Track uniqueness sets in table types
Diffstat (limited to 'tests')
-rw-r--r--tests/cst.ur9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/cst.ur b/tests/cst.ur
index 104a9f34..0ebcc977 100644
--- a/tests/cst.ur
+++ b/tests/cst.ur
@@ -4,9 +4,12 @@ table t : {A : int, B : int}
CONSTRAINT UniBoth UNIQUE (A, B),
CONSTRAINT UniAm UNIQUE {#A},
- CONSTRAINT UniAm2 UNIQUE {{[A = _]}},
- CONSTRAINT UniAm3 {unique [[A = _]] !},
- {{one_constraint [#UniAm4] (unique [[A = _]] !)}}
+ CONSTRAINT UniAm2 {unique [#A] [[]] ! !},
+ {{one_constraint [#UniAm3] (unique [#A] [[]] ! !)}},
+
+ CONSTRAINT UniBothm UNIQUE ({#A}, {#B}),
+ CONSTRAINT UniBothm2 {unique [#A] [[B = _]] ! !},
+ {{one_constraint [#UniBothm3] (unique [#A] [[B = _]] ! !)}}
fun main () : transaction page =
queryI (SELECT * FROM t) (fn _ => return ());