diff options
author | chriseth <chris@ethereum.org> | 2016-11-16 02:16:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 02:16:07 +0800 |
commit | 192a81892dca3762c050f159da202c8c8f90f72c (patch) | |
tree | 049fdd9eaf1bbe8ec18ff643739378a076d54e9e /test/libsolidity/SolidityNatspecJSON.cpp | |
parent | 0072160d7772b2f30c2c6af4428728cb31641696 (diff) | |
parent | 227f6aab4f96003e0f7c99194a9ea1095041970f (diff) | |
download | dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.tar dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.tar.gz dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.tar.bz2 dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.tar.lz dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.tar.xz dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.tar.zst dexon-solidity-192a81892dca3762c050f159da202c8c8f90f72c.zip |
Merge pull request #1377 from ethereum/keep-json-values
Keep internal results in JSON
Diffstat (limited to 'test/libsolidity/SolidityNatspecJSON.cpp')
-rw-r--r-- | test/libsolidity/SolidityNatspecJSON.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/libsolidity/SolidityNatspecJSON.cpp b/test/libsolidity/SolidityNatspecJSON.cpp index 1f74e928..49844f15 100644 --- a/test/libsolidity/SolidityNatspecJSON.cpp +++ b/test/libsolidity/SolidityNatspecJSON.cpp @@ -45,21 +45,19 @@ public: bool _userDocumentation ) { - std::string generatedDocumentationString; ETH_TEST_REQUIRE_NO_THROW(m_compilerStack.parse("pragma solidity >=0.0;\n" + _code), "Parsing failed"); + Json::Value generatedDocumentation; if (_userDocumentation) - generatedDocumentationString = m_compilerStack.metadata("", DocumentationType::NatspecUser); + generatedDocumentation = m_compilerStack.metadata("", DocumentationType::NatspecUser); else - generatedDocumentationString = m_compilerStack.metadata("", DocumentationType::NatspecDev); - Json::Value generatedDocumentation; - m_reader.parse(generatedDocumentationString, generatedDocumentation); + generatedDocumentation = m_compilerStack.metadata("", DocumentationType::NatspecDev); Json::Value expectedDocumentation; m_reader.parse(_expectedDocumentationString, expectedDocumentation); BOOST_CHECK_MESSAGE( expectedDocumentation == generatedDocumentation, - "Expected " << _expectedDocumentationString << - "\n but got:\n" << generatedDocumentationString + "Expected " << expectedDocumentation.toStyledString() << + "\n but got:\n" << generatedDocumentation.toStyledString() ); } |