mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add Yul optimizer test framework.
This commit is contained in:
@@ -3,5 +3,5 @@ target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_L
|
||||
|
||||
add_executable(isoltest isoltest.cpp ../Options.cpp ../Common.cpp ../libsolidity/TestCase.cpp ../libsolidity/SyntaxTest.cpp
|
||||
../libsolidity/AnalysisFramework.cpp ../libsolidity/SolidityExecutionFramework.cpp ../ExecutionFramework.cpp
|
||||
../RPCSession.cpp ../libsolidity/ASTJSONTest.cpp)
|
||||
../RPCSession.cpp ../libsolidity/ASTJSONTest.cpp ../libjulia/YulOptimizerTest.cpp)
|
||||
target_link_libraries(isoltest PRIVATE libsolc solidity evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <test/libsolidity/AnalysisFramework.h>
|
||||
#include <test/libsolidity/SyntaxTest.h>
|
||||
#include <test/libsolidity/ASTJSONTest.h>
|
||||
#include <test/libjulia/YulOptimizerTest.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
@@ -371,6 +372,8 @@ Allowed options)",
|
||||
|
||||
TestStats global_stats{0, 0};
|
||||
|
||||
// Actually run the tests.
|
||||
// If you add new tests here, you also have to add them in boostTest.cpp
|
||||
if (auto stats = runTestSuite("Syntax", testPath / "libsolidity", "syntaxTests", SyntaxTest::create, formatted))
|
||||
global_stats += *stats;
|
||||
else
|
||||
@@ -381,6 +384,17 @@ Allowed options)",
|
||||
else
|
||||
return 1;
|
||||
|
||||
if (auto stats = runTestSuite(
|
||||
"Yul Optimizer",
|
||||
testPath / "libjulia",
|
||||
"yulOptimizerTests",
|
||||
julia::test::YulOptimizerTest::create,
|
||||
formatted
|
||||
))
|
||||
global_stats += *stats;
|
||||
else
|
||||
return 1;
|
||||
|
||||
cout << endl << "Summary: ";
|
||||
FormattedScope(cout, formatted, {BOLD, global_stats ? GREEN : RED}) <<
|
||||
global_stats.successCount << "/" << global_stats.testCount;
|
||||
|
||||
Reference in New Issue
Block a user