mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adapt tests directory to C++ namespace changes.
This commit is contained in:
committed by
Daniel Kirchner
parent
6b23412fae
commit
ed45b000d1
@@ -27,13 +27,9 @@
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <libdevcore/Exceptions.h>
|
||||
|
||||
using namespace langutil;
|
||||
using namespace solidity::langutil;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace solidity
|
||||
{
|
||||
namespace test
|
||||
namespace solidity::frontend::test
|
||||
{
|
||||
|
||||
class DocumentationChecker
|
||||
@@ -48,7 +44,7 @@ public:
|
||||
{
|
||||
m_compilerStack.reset();
|
||||
m_compilerStack.setSources({{"", "pragma solidity >=0.0;\n" + _code}});
|
||||
m_compilerStack.setEVMVersion(dev::test::Options::get().evmVersion());
|
||||
m_compilerStack.setEVMVersion(solidity::test::Options::get().evmVersion());
|
||||
BOOST_REQUIRE_MESSAGE(m_compilerStack.parseAndAnalyze(), "Parsing contract failed");
|
||||
|
||||
Json::Value generatedDocumentation;
|
||||
@@ -57,7 +53,7 @@ public:
|
||||
else
|
||||
generatedDocumentation = m_compilerStack.natspecDev(_contractName);
|
||||
Json::Value expectedDocumentation;
|
||||
jsonParseStrict(_expectedDocumentationString, expectedDocumentation);
|
||||
util::jsonParseStrict(_expectedDocumentationString, expectedDocumentation);
|
||||
BOOST_CHECK_MESSAGE(
|
||||
expectedDocumentation == generatedDocumentation,
|
||||
"Expected:\n" << expectedDocumentation.toStyledString() <<
|
||||
@@ -69,7 +65,7 @@ public:
|
||||
{
|
||||
m_compilerStack.reset();
|
||||
m_compilerStack.setSources({{"", "pragma solidity >=0.0;\n" + _code}});
|
||||
m_compilerStack.setEVMVersion(dev::test::Options::get().evmVersion());
|
||||
m_compilerStack.setEVMVersion(solidity::test::Options::get().evmVersion());
|
||||
BOOST_CHECK(!m_compilerStack.parseAndAnalyze());
|
||||
BOOST_REQUIRE(Error::containsErrorOfType(m_compilerStack.errors(), Error::Type::DocstringParsingError));
|
||||
}
|
||||
@@ -979,5 +975,3 @@ BOOST_AUTO_TEST_CASE(dev_constructor_and_function)
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user