Permalink
Browse files

Add tests for clause/clset (mix with normal clauses)

  • Loading branch information...
1 parent e8f7f1a commit 853568bd68a93180d78cbeca51c4b4bde713eb2f Steven Haryanto (on Asus Zenbook) committed Jan 11, 2013
Showing with 24 additions and 0 deletions.
  1. +24 −0 devscripts/gen-type-spectest
@@ -138,6 +138,17 @@ sub gen_BaseType_tests {
schema => ["$Type*", clause=>$args{ok_clauses}[0]],
valid => 1,
} if $args{ok_clauses};
+ # to test that the existence of clause does not override clauses outside it
+ push @res, {
+ name => "clause (ok) + clause nok = nok",
+ input => $args{value},
+ schema => [
+ "$Type*",
+ clause=>$args{ok_clauses}[0],
+ $args{nok_clauses}[1][0] => $args{nok_clauses}[1][1],
+ ],
+ valid => 0,
+ } if $args{ok_clauses};
push @res, {
name => "clause (nok)",
input => $args{value},
@@ -181,6 +192,19 @@ sub gen_BaseType_tests {
}],
valid => 1,
} if $args{ok_clauses};
+ # to test that the existence of clset does not override clauses outside it
+ push @res, {
+ name => "clset (ok) + clause nok = nok",
+ input => $args{value},
+ schema => [
+ "$Type*",
+ clset=>{
+ $args{ok_clauses}[0][0] => $args{ok_clauses}[0][1],
+ },
+ $args{nok_clauses}[1][0] => $args{nok_clauses}[1][1],
+ ],
+ valid => 0,
+ } if $args{ok_clauses};
push @res, {
name => "clset (ok + nok = nok)",
input => $args{value},

0 comments on commit 853568b

Please sign in to comment.