From ed3ab3506a8acb83bda9477f733d2cb07125a74a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 2 May 2017 15:20:27 +0100 Subject: Follow the JSON I/O spec closely --- test/libsolidity/StandardCompiler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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()); -- cgit