Skip to content

Commit

Permalink
Add diagnostic test for error w/ and w/o newline
Browse files Browse the repository at this point in the history
  • Loading branch information
aazuspan committed Aug 21, 2024
1 parent ff43b84 commit f6c77e6
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests/server_tests/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,23 @@ class DiagnosticTestCase(TestCase):
expected=[
lsp.Diagnostic(
range=lsp.Range(
start=lsp.Position(line=0, character=0),
end=lsp.Position(line=0, character=0),
start=lsp.Position(line=0, character=5),
end=lsp.Position(line=0, character=5),
),
message="Register 0x64 out of range for MULX",
severity=lsp.DiagnosticSeverity.Error,
source="SPINAsm",
),
],
),
DiagnosticTestCase(
name="out of range (without newline)",
source="""MULX 100""",
expected=[
lsp.Diagnostic(
range=lsp.Range(
start=lsp.Position(line=0, character=5),
end=lsp.Position(line=0, character=5),
),
message="Register 0x64 out of range for MULX",
severity=lsp.DiagnosticSeverity.Error,
Expand Down

0 comments on commit f6c77e6

Please sign in to comment.