aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-02 23:47:14 +0800
committerGitHub <noreply@github.com>2017-05-02 23:47:14 +0800
commitc09f071ff693f52a2a1434cfd6963b2d1818776e (patch)
treeae903de41b1d063a046951090de4b2562e44b0a8 /test/libsolidity
parentacab525fefe37f2c02478c79399d5c79e211434e (diff)
parented3ab3506a8acb83bda9477f733d2cb07125a74a (diff)
downloaddexon-solidity-c09f071ff693f52a2a1434cfd6963b2d1818776e.tar.gz
dexon-solidity-c09f071ff693f52a2a1434cfd6963b2d1818776e.tar.zst
dexon-solidity-c09f071ff693f52a2a1434cfd6963b2d1818776e.zip
Merge pull request #2211 from ethereum/jsonio-fixes
Follow the JSON I/O spec closely
Diffstat (limited to 'test/libsolidity')
-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());