Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
Fix ScriptSession diagnostic test failing
Browse files Browse the repository at this point in the history
  • Loading branch information
parker-research authored and MikePopoloski committed Dec 3, 2024
1 parent 86cb191 commit fc25dce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_compilation():

def test_scriptsession():
session = ScriptSession()
session.eval('integer arr[string] = \'{"Hello":4, "World":8, default:-1};')
session.eval("""integer arr[string] = '{"Hello":4, "World":8, default:-1};""")
session.eval(
"""
function int func(int i, integer arr[string]);
Expand All @@ -99,7 +99,10 @@ def test_scriptsession():
)

assert session.eval("func(4, arr)").value == 2
assert len(session.getDiagnostics()) == 0

# Missing 'default' in case statement. Check that the diagnostic is reported.
assert len(session.getDiagnostics()) == 1
assert session.getDiagnostics()[0].code == Diags.CaseDefault


def test_symbol_inspection():
Expand Down

0 comments on commit fc25dce

Please sign in to comment.