mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Trigger cases by the JSON (and not string) interface
This commit is contained in:
parent
10ec334f74
commit
137ef78e9a
@ -87,7 +87,17 @@ BOOST_AUTO_TEST_SUITE(StandardCompiler)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(assume_object_input)
|
||||
{
|
||||
Json::Value result = compile("");
|
||||
Json::Value result;
|
||||
|
||||
/// Use the native JSON interface of StandardCompiler to trigger these
|
||||
solidity::StandardCompiler compiler;
|
||||
result = compiler.compile(Json::Value());
|
||||
BOOST_CHECK(containsError(result, "JSONError", "Input is not a JSON object."));
|
||||
result = compiler.compile(Json::Value("INVALID"));
|
||||
BOOST_CHECK(containsError(result, "JSONError", "Input is not a JSON object."));
|
||||
|
||||
/// Use the string interface of StandardCompiler to trigger these
|
||||
result = compile("");
|
||||
BOOST_CHECK(containsError(result, "JSONError", "* Line 1, Column 1\n Syntax error: value, object or array expected.\n"));
|
||||
result = compile("invalid");
|
||||
BOOST_CHECK(containsError(result, "JSONError", "* Line 1, Column 1\n Syntax error: value, object or array expected.\n"));
|
||||
|
Loading…
Reference in New Issue
Block a user