aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/StandardCompiler.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-02 22:20:27 +0800
committerchriseth <chris@ethereum.org>2017-05-02 22:52:38 +0800
commited3ab3506a8acb83bda9477f733d2cb07125a74a (patch)
tree7cfda674b2ef48fe2ebb0efb2a987ed135caabb0 /test/libsolidity/StandardCompiler.cpp
parent1b15291af2342f65d784032b4508706100b5b016 (diff)
downloaddexon-solidity-ed3ab3506a8acb83bda9477f733d2cb07125a74a.tar.gz
dexon-solidity-ed3ab3506a8acb83bda9477f733d2cb07125a74a.tar.zst
dexon-solidity-ed3ab3506a8acb83bda9477f733d2cb07125a74a.zip
Follow the JSON I/O spec closely
Diffstat (limited to 'test/libsolidity/StandardCompiler.cpp')
-rw-r--r--test/libsolidity/StandardCompiler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp
index f480ba6f..ffb0e2c6 100644
--- a/test/libsolidity/StandardCompiler.cpp
+++ b/test/libsolidity/StandardCompiler.cpp
@@ -235,12 +235,12 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
BOOST_CHECK(containsAtMostWarnings(result));
Json::Value contract = getContractResult(result, "fileA", "A");
BOOST_CHECK(contract.isObject());
- BOOST_CHECK(contract["abi"].isString());
- BOOST_CHECK(contract["abi"].asString() == "[]");
- BOOST_CHECK(contract["devdoc"].isString());
- BOOST_CHECK(contract["devdoc"].asString() == "{\"methods\":{}}");
- BOOST_CHECK(contract["userdoc"].isString());
- BOOST_CHECK(contract["userdoc"].asString() == "{\"methods\":{}}");
+ BOOST_CHECK(contract["abi"].isArray());
+ BOOST_CHECK(dev::jsonCompactPrint(contract["abi"]) == "[]");
+ BOOST_CHECK(contract["devdoc"].isObject());
+ BOOST_CHECK(dev::jsonCompactPrint(contract["devdoc"]) == "{\"methods\":{}}");
+ BOOST_CHECK(contract["userdoc"].isObject());
+ BOOST_CHECK(dev::jsonCompactPrint(contract["userdoc"]) == "{\"methods\":{}}");
BOOST_CHECK(contract["evm"].isObject());
/// @TODO check evm.methodIdentifiers, legacyAssembly, bytecode, deployedBytecode
BOOST_CHECK(contract["evm"]["bytecode"].isObject());