aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityNatspecJSON.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/SolidityNatspecJSON.cpp')
-rw-r--r--test/libsolidity/SolidityNatspecJSON.cpp12
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()
);
}