mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Only use SourceReferenceFormatterHuman
This commit is contained in:
committed by
chriseth
parent
1126838a31
commit
1dedba8538
@@ -24,7 +24,7 @@
|
||||
#include <test/Common.h>
|
||||
|
||||
#include <libsolidity/interface/CompilerStack.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/SourceReferenceFormatterHuman.h>
|
||||
|
||||
#include <libsolidity/ast/AST.h>
|
||||
|
||||
@@ -149,7 +149,7 @@ string AnalysisFramework::formatErrors() const
|
||||
|
||||
string AnalysisFramework::formatError(Error const& _error) const
|
||||
{
|
||||
return SourceReferenceFormatter::formatErrorInformation(_error);
|
||||
return SourceReferenceFormatterHuman::formatErrorInformation(_error);
|
||||
}
|
||||
|
||||
ContractDefinition const* AnalysisFramework::retrieveContractByName(SourceUnit const& _source, string const& _name)
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <libevmasm/PathGasMeter.h>
|
||||
#include <libsolidity/ast/AST.h>
|
||||
#include <libsolidity/interface/GasEstimator.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity::langutil;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <liblangutil/Scanner.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/SourceReferenceFormatterHuman.h>
|
||||
|
||||
#include <libevmasm/Assembly.h>
|
||||
|
||||
@@ -81,7 +81,7 @@ std::optional<Error> parseAndReturnFirstError(
|
||||
{
|
||||
string errors;
|
||||
for (auto const& err: stack.errors())
|
||||
errors += SourceReferenceFormatter::formatErrorInformation(*err);
|
||||
errors += SourceReferenceFormatterHuman::formatErrorInformation(*err);
|
||||
BOOST_FAIL("Found more than one error:\n" + errors);
|
||||
}
|
||||
error = e;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <iostream>
|
||||
#include <boost/test/framework.hpp>
|
||||
#include <test/libsolidity/SolidityExecutionFramework.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/SourceReferenceFormatterHuman.h>
|
||||
|
||||
using namespace solidity;
|
||||
using namespace solidity::test;
|
||||
@@ -60,7 +62,7 @@ bytes SolidityExecutionFramework::multiSourceCompileContract(
|
||||
for (auto const& error: m_compiler.errors())
|
||||
if (error->type() == langutil::Error::Type::CodeGenerationError)
|
||||
BOOST_THROW_EXCEPTION(*error);
|
||||
langutil::SourceReferenceFormatter formatter(std::cerr);
|
||||
langutil::SourceReferenceFormatterHuman formatter(std::cerr, true, false);
|
||||
|
||||
for (auto const& error: m_compiler.errors())
|
||||
formatter.printErrorInformation(*error);
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
|
||||
namespace solidity::frontend::test
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user