Skip to content

Commit

Permalink
Merge pull request #605 from conjure-cp/fix-521
Browse files Browse the repository at this point in the history
Adding a regression test case for #521
  • Loading branch information
ozgurakgun committed Nov 8, 2023
2 parents a9cbc2e + 76bb044 commit ab20205
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/custom/issues/521/1.essence
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find b : bool
such that b = ([1, 2, 3] = flatten([1, 2, 3], 0))
2 changes: 2 additions & 0 deletions tests/custom/issues/521/2.essence
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find c : bool
such that c = alldifferent_except([1, 2, 5, 1, 6])
2 changes: 2 additions & 0 deletions tests/custom/issues/521/3.essence
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find b : set of int(1..6)
such that b = party(5)
5 changes: 5 additions & 0 deletions tests/custom/issues/521/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rm -rf conjure-output
conjure solve 1.essence
conjure solve 2.essence
conjure solve 3.essence
rm -rf conjure-output
28 changes: 28 additions & 0 deletions tests/custom/issues/521/stderr.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Error:
1.essence:2:36:
|
2 | such that b = ([1, 2, 3] = flatten([1, 2, 3], 0))
| ^^^^^^^^^
Error: 1st arg must be a constant positive int

1.essence:2:47:
|
2 | such that b = ([1, 2, 3] = flatten([1, 2, 3], 0))
| ^
Type error:
Expected: [[?]]
Got: int

Error:
2.essence:2:34:
|
2 | such that c = alldifferent_except([1, 2, 5, 1, 6])
| ^^^^^^^^^^^^^^^^^
Insufficient args, expected 2 got 1

Error: 3.essence:2:20:
|
2 | such that b = party(5)
| ^^^
Insufficient args, expected 2 got 1

0 comments on commit ab20205

Please sign in to comment.