Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testament: fix missing error reporting #1451

Merged
merged 4 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion testament/categories.nim
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ proc isJoinableSpec(spec: TSpec, targets: set[TTarget], early: TResultEnum): boo
not fileExists(spec.file.changeFileExt("nim.cfg")) and
not fileExists(parentDir(spec.file) / "nim.cfg") and
spec.cmd.len == 0 and
early notin {reDisabled} and
early notin {reDisabled, reInvalidSpec} and
not spec.unjoinable and
spec.exitCode == 0 and
spec.input.len == 0 and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
discard """
description: '''
Ensure that converters are considered for arguments to static parameters
"
'''
"""

converter toInt(x: float): int = int(x)
Expand Down
4 changes: 2 additions & 2 deletions tests/lang_callable/macros/tmodify_result_assignment.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ discard """
Partially typed ``nkReturnStmt`` AST is properly re-analyzed after macro
invocation
'''
errmsg: "got <string> but expected 'int'"
errormsg: "got <string> but expected 'int'"
line: 26
saem marked this conversation as resolved.
Show resolved Hide resolved
"""

Expand All @@ -19,7 +19,7 @@ macro modify(input: typed) =
# replace the right side of the assignment with an expression of different,
# incompatible type
result.body[0][1] = newStrLitNode("") # wrong type: int vs. string
result.body.copyLineInfo(input.body[0][1])
result.body[0][1].copyLineInfo(input.body[0][1])

modify:
proc p(): int =
Expand Down
2 changes: 1 addition & 1 deletion tests/lang_stmts/for_stmt/tfor_ill_formed_sym.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
discard """
description: "Ensure that ill-formed AST generates a well formed error"
errmsg: "identifier expected, but found '123'"
errormsg: "identifier expected, but found: 123"
"""

# This test covers a regression where an error with the symbol outside a pragma
Expand Down
2 changes: 1 addition & 1 deletion tests/vm/tconst_seq_crash.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ discard """
be code evaluated with the compile-time VM
'''
target: native
action: compiles
action: compile
"""

type Obj = object
Expand Down
Loading