-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from nomennescio/master
On compiler errors prevent running tests and report errors
- Loading branch information
Showing
5 changed files
with
97 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
test-compilation-error.factor | ||
|
||
6: : wont-compile ; | ||
^ | ||
Expected ( but got ; | ||
(U) Quotation: [ c-to-factor => ] | ||
Word: c-to-factor | ||
(U) Quotation: [ [ (get-catchstack) push ] dip call => (get-catchstack) pop* ] | ||
(O) Word: command-line-startup | ||
(O) Word: run-script | ||
(O) Word: run-file | ||
(O) Word: parse-file | ||
(O) Word: parse-stream | ||
(O) Word: parse-fresh | ||
(O) Word: (parse-lines) | ||
(O) Word: (parse-until) | ||
(O) Word: parse-until-step | ||
(O) Word: execute-parsing | ||
(O) Word: POSTPONE: : | ||
(O) Word: (:) | ||
(O) Word: scan-effect | ||
(O) Word: expect | ||
(O) Word: unexpected | ||
(O) Method: M\ object throw | ||
(U) Quotation: [ | ||
OBJ-CURRENT-THREAD special-object error-thread set-global | ||
current-continuation => error-continuation set-global | ||
[ original-error set-global ] [ rethrow ] bi | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! Copyright 2024 nomennescio | ||
|
||
USING: tools.testest kernel math ; | ||
IN: tests | ||
|
||
: wont-compile ; | ||
|
||
: run-tests ( -- ) | ||
|
||
"Compilation error" describe#{ | ||
"Compilation error in user code" it#{ | ||
<{ wont-compile -> }> | ||
}# | ||
}# | ||
; | ||
|
||
MAIN: run-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
<DESCRIBE::>Compilation error | ||
|
||
<IT::>Compilation error in user code | ||
|
||
==== test-effect-error.factor | ||
|
||
test-effect-error.factor: 6 | ||
|
||
Asset: wont-infer | ||
|
||
Stack effect declaration is wrong | ||
inferred ( -- x ) | ||
declared ( -- ) | ||
|
||
<COMPLETEDIN::>0.345100 ms | ||
|
||
<COMPLETEDIN::>0.516400 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! Copyright 2024 nomennescio | ||
|
||
USING: tools.testest kernel math ; | ||
IN: tests | ||
|
||
: wont-infer ( -- ) 0 ; | ||
|
||
: run-tests ( -- ) | ||
|
||
"Compilation error" describe#{ | ||
"Compilation error in user code" it#{ | ||
<{ wont-infer -> }> | ||
}# | ||
}# | ||
; | ||
|
||
MAIN: run-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters