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

Fix ScriptSession diagnostic test failing #388

Merged
Merged
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
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
Loading