Skip to content

Commit

Permalink
Update test "compiling standard JSON (invalid JSON)" to be nlohmann::…
Browse files Browse the repository at this point in the history
…json compatible.
  • Loading branch information
aarlt committed Feb 26, 2024
1 parent 72d67e2 commit 82e37f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,11 @@ function runTests (solc, versionText) {
t.test('compiling standard JSON (invalid JSON)', function (st) {
const output = JSON.parse(solc.compile('{invalid'));
// TODO: change wrapper to output matching error
st.ok(expectError(output, 'JSONError', 'Line 1, Column 2\n Missing \'}\' or object member name') || expectError(output, 'JSONError', 'Invalid JSON supplied:'));
st.ok(
expectError(output, 'JSONError', 'Line 1, Column 2\n Missing \'}\' or object member name') ||
expectError(output, 'JSONError', 'Invalid JSON supplied:') ||
expectError(output, 'JSONError', '[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing object key - invalid literal; last read: \'{i\'; expected string literal')
);
st.end();
});

Expand Down

0 comments on commit 82e37f3

Please sign in to comment.