Skip to content

Commit

Permalink
Suppress unicode printing in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwman committed Sep 10, 2024
1 parent 608afa4 commit b32af56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/parser-test-files/type-inference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ error: Declared type is too general
--> test:4:8
|
4 | (define x Unit)
| ^ Declared type :A. :A is more general than inferred type UNIT.
| ^ Declared type FORALL :A. :A is more general than inferred type UNIT.

================================================================================
Missing explicit predicates cannot be defaulted
Expand Down Expand Up @@ -101,7 +101,7 @@ error: Kind mismatch
--> test:3:12
|
3 | (declare x (Integer Integer))
| ^^^^^^^ Expected kind '* *' but got kind '*'
| ^^^^^^^ Expected kind '* -> *' but got kind '*'

================================================================================
Check that variables can not be declared to have kind (* -> *)
Expand All @@ -123,7 +123,7 @@ error: Kind mismatch
--> test:7:11
|
7 | (declare x Maybe)
| ^^^^^ Expected kind '*' but got kind '* *'
| ^^^^^ Expected kind '*' but got kind '* -> *'

================================================================================
Match branches must return the same type
Expand Down Expand Up @@ -213,7 +213,7 @@ error: Type mismatch
13 | (define (f a b)
| _^
14 | | (== a b))
| |____________^ Expected type '((LIST COLOR) BOOLEAN)' but got type '((LIST COLOR) (LIST COLOR) BOOLEAN)'
| |____________^ Expected type '((LIST COLOR) -> BOOLEAN)' but got type '((LIST COLOR) -> (LIST COLOR) -> BOOLEAN)'

================================================================================
Check that polymorphic recursion is not possible without an explicit binding
Expand Down
3 changes: 2 additions & 1 deletion tests/utilities.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ Returns (values SOURCE-PATHNAME COMPILED-PATHNAME)."

(defun run-test-file (pathname)
"Run the test file at PATHNAME."
(let ((file (test-file pathname)))
(let ((file (test-file pathname))
(coalton-impl/settings:*coalton-print-unicode* nil))
(loop :for (line number description program expected-error)
:in (coalton-tests/loader:load-test-file file)
:for generated-error := (collect-compiler-error program)
Expand Down

0 comments on commit b32af56

Please sign in to comment.