aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-09 21:43:55 +0800
committerchriseth <chris@ethereum.org>2018-10-11 22:59:57 +0800
commit4607118d2e9bbf59707b48f177aff54ac99163b8 (patch)
tree58853b286db239558ee9062a788bbfd86837def3 /test/tools
parent6859ec043412ddb1da1929fec4064fbd288db71e (diff)
downloaddexon-solidity-4607118d2e9bbf59707b48f177aff54ac99163b8.tar.gz
dexon-solidity-4607118d2e9bbf59707b48f177aff54ac99163b8.tar.zst
dexon-solidity-4607118d2e9bbf59707b48f177aff54ac99163b8.zip
Add Yul optimizer test framework.
Diffstat (limited to 'test/tools')
-rw-r--r--test/tools/CMakeLists.txt2
-rw-r--r--test/tools/isoltest.cpp14
2 files changed, 15 insertions, 1 deletions
diff --git a/test/tools/CMakeLists.txt b/test/tools/CMakeLists.txt
index 2f107d39..bb7adc13 100644
--- a/test/tools/CMakeLists.txt
+++ b/test/tools/CMakeLists.txt
@@ -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})
diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp
index dac87d1c..5134fe4f 100644
--- a/test/tools/isoltest.cpp
+++ b/test/tools/isoltest.cpp
@@ -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;