Skip to content

Commit

Permalink
tests: add negative fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Jan 6, 2023
1 parent cd680d9 commit 6467c1d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/src/test/resources/failure/holes/pi-dom-meta.aya
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data X : Set
data infix = (a b : X) : Set

data Test : Type
| con (x : _) (y : X) (x = y)
38 changes: 38 additions & 0 deletions base/src/test/resources/failure/holes/pi-dom-meta.aya.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
In file $FILE:5:19 ->

3 │
4 │ data Test : Type
5 │ | con (x : _) (y : X) (x = y)
│ ╰╯

Error: The type
X
is in the domain of a function whose type is
Type 0

In file $FILE:5:11 ->

3 │
4 │ data Test : Type
5 │ | con (x : _) (y : X) (x = y)
│ ╰╯

Error: The meta (denoted ? below) is supposed to satisfy:
? → _ : Type 0
However, the solution below does not seem so:
X

In file $FILE:5:23 ->

3 │
4 │ data Test : Type
5 │ | con (x : _) (y : X) (x = y)
│ ╰───╯

Error: The type
x = y
is in the domain of a function whose type is
Type 0

3 error(s), 0 warning(s).
What are you doing?
4 changes: 4 additions & 0 deletions base/src/test/resources/failure/holes/pi-dom.aya
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data X : Set

data Test : Type
| con X
14 changes: 14 additions & 0 deletions base/src/test/resources/failure/holes/pi-dom.aya.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
In file $FILE:4:6 ->

2 │
3 │ data Test : Type
4 │ | con X
│ ╰╯

Error: The type
X
is in the domain of a function whose type is
Type 0

1 error(s), 0 warning(s).
What are you doing?

0 comments on commit 6467c1d

Please sign in to comment.