From 0f29ac4e563f60be781b31ed9ef2693e1a19dcc8 Mon Sep 17 00:00:00 2001 From: Alexander Arlt Date: Wed, 7 Feb 2018 02:05:20 +0100 Subject: Add new JSON API for better abstraction and for supporting strict JSON parsing --- test/libsolidity/SolidityABIJSON.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/libsolidity/SolidityABIJSON.cpp') diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index 26bfb6d0..e242508a 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include namespace dev { @@ -48,7 +48,7 @@ public: Json::Value generatedInterface = m_compilerStack.contractABI(m_compilerStack.lastContractName()); Json::Value expectedInterface; - BOOST_REQUIRE(m_reader.parse(_expectedInterfaceString, expectedInterface)); + BOOST_REQUIRE(jsonParseStrict(_expectedInterfaceString, expectedInterface)); BOOST_CHECK_MESSAGE( expectedInterface == generatedInterface, "Expected:\n" << expectedInterface.toStyledString() << @@ -58,7 +58,6 @@ public: protected: CompilerStack m_compilerStack; - Json::Reader m_reader; }; BOOST_FIXTURE_TEST_SUITE(SolidityABIJSON, JSONInterfaceChecker) -- cgit v1.2.3 From 05cc5f22b204a0c389e1de4feaa44d33492dd053 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 23 Feb 2018 19:29:20 +0100 Subject: Correctly set evm version in tests --- test/libsolidity/SolidityABIJSON.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/libsolidity/SolidityABIJSON.cpp') diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index e242508a..0d471b32 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -44,6 +44,8 @@ public: { m_compilerStack.reset(false); m_compilerStack.addSource("", "pragma solidity >=0.0;\n" + _code); + m_compilerStack.setEVMVersion(dev::test::Options::get().evmVersion()); + m_compilerStack.setOptimiserSettings(dev::test::Options::get().optimize); BOOST_REQUIRE_MESSAGE(m_compilerStack.parseAndAnalyze(), "Parsing contract failed"); Json::Value generatedInterface = m_compilerStack.contractABI(m_compilerStack.lastContractName()); -- cgit v1.2.3