diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-16 01:20:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-16 01:20:30 +0800 |
commit | 9205662de9416ab160db7327a6022ea8b1fba3e1 (patch) | |
tree | dff81203a4dbe1c76803c6fe47d9a7f7bd386f3c /test/libsolidity/SolidityNatspecJSON.cpp | |
parent | 9719cf38e662e428ace8f3ebce9774a5338f0ce5 (diff) | |
download | dexon-solidity-9205662de9416ab160db7327a6022ea8b1fba3e1.tar.gz dexon-solidity-9205662de9416ab160db7327a6022ea8b1fba3e1.tar.zst dexon-solidity-9205662de9416ab160db7327a6022ea8b1fba3e1.zip |
Update tests to use JSON
Diffstat (limited to 'test/libsolidity/SolidityNatspecJSON.cpp')
-rw-r--r-- | test/libsolidity/SolidityNatspecJSON.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/libsolidity/SolidityNatspecJSON.cpp b/test/libsolidity/SolidityNatspecJSON.cpp index 1f74e928..facfcda7 100644 --- a/test/libsolidity/SolidityNatspecJSON.cpp +++ b/test/libsolidity/SolidityNatspecJSON.cpp @@ -45,21 +45,19 @@ public: bool _userDocumentation ) { - std::string generatedDocumentationString; + Json::Value generatedDocumentation; ETH_TEST_REQUIRE_NO_THROW(m_compilerStack.parse("pragma solidity >=0.0;\n" + _code), "Parsing failed"); 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 + "\n but got:\n" << Json::StyledWriter().write(generatedDocumentation) ); } |