Skip to content

Commit 840f3b1

Browse files
aarltcameel
authored andcommitted
Add nlohmann::json compatibility.
1 parent 6c2d135 commit 840f3b1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/compiler.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function runTests (solc, versionText) {
7676
const error = output.errors[errorIndex];
7777
if (error.type === errorType) {
7878
if (message) {
79-
if (error.message.match(message) !== null) {
79+
if (error.message === message || error.message.match(message) !== null) {
8080
return true;
8181
}
8282
} else {
@@ -751,7 +751,11 @@ function runTests (solc, versionText) {
751751
t.test('compiling standard JSON (invalid JSON)', function (st) {
752752
const output = JSON.parse(solc.compile('{invalid'));
753753
// TODO: change wrapper to output matching error
754-
st.ok(expectError(output, 'JSONError', 'Line 1, Column 2\n Missing \'}\' or object member name') || expectError(output, 'JSONError', 'Invalid JSON supplied:'));
754+
st.ok(
755+
expectError(output, 'JSONError', 'Line 1, Column 2\n Missing \'}\' or object member name') ||
756+
expectError(output, 'JSONError', 'Invalid JSON supplied:') ||
757+
expectError(output, 'JSONError', 'parse error at line 1, column 2: syntax error while parsing object key - invalid literal; last read: \'{i\'; expected string literal')
758+
);
755759
st.end();
756760
});
757761

0 commit comments

Comments
 (0)