aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools')
-rw-r--r--test/tools/isoltest.cpp62
-rw-r--r--test/tools/yulopti.cpp6
2 files changed, 10 insertions, 58 deletions
diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp
index 13585887..e5578045 100644
--- a/test/tools/isoltest.cpp
+++ b/test/tools/isoltest.cpp
@@ -19,11 +19,7 @@
#include <test/Common.h>
#include <test/libsolidity/AnalysisFramework.h>
-#include <test/libsolidity/SyntaxTest.h>
-#include <test/libsolidity/ASTJSONTest.h>
-#include <test/libsolidity/SMTCheckerJSONTest.h>
-#include <test/libyul/YulOptimizerTest.h>
-#include <test/libyul/ObjectCompilerTest.h>
+#include <test/InteractiveTests.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/replace.hpp>
@@ -380,59 +376,13 @@ 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
- return 1;
-
- if (auto stats = runTestSuite("JSON AST", testPath / "libsolidity", "ASTJSON", ASTJSONTest::create, formatted))
- global_stats += *stats;
- else
- return 1;
-
- if (auto stats = runTestSuite(
- "Yul Optimizer",
- testPath / "libyul",
- "yulOptimizerTests",
- yul::test::YulOptimizerTest::create,
- formatted
- ))
- global_stats += *stats;
- else
- return 1;
-
- if (auto stats = runTestSuite(
- "Yul Object Compiler",
- testPath / "libyul",
- "objectCompiler",
- yul::test::ObjectCompilerTest::create,
- formatted
- ))
- global_stats += *stats;
- else
- return 1;
-
- if (!disableSMT)
+ // Interactive tests are added in InteractiveTests.h
+ for (auto const& ts: g_interactiveTestsuites)
{
- if (auto stats = runTestSuite(
- "SMT Checker",
- testPath / "libsolidity",
- "smtCheckerTests",
- SyntaxTest::create,
- formatted
- ))
- global_stats += *stats;
- else
- return 1;
+ if (ts.smt && disableSMT)
+ continue;
- if (auto stats = runTestSuite(
- "SMT Checker JSON",
- testPath / "libsolidity",
- "smtCheckerTestsJSON",
- SMTCheckerTest::create,
- formatted
- ))
+ if (auto stats = runTestSuite(ts.title, testPath / ts.path, ts.subpath, ts.testCaseCreator, formatted))
global_stats += *stats;
else
return 1;
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp
index 477de42f..3dc35f73 100644
--- a/test/tools/yulopti.cpp
+++ b/test/tools/yulopti.cpp
@@ -49,6 +49,8 @@
#include <libyul/optimiser/StructuralSimplifier.h>
#include <libyul/optimiser/VarDeclPropagator.h>
+#include <libyul/backends/evm/EVMDialect.h>
+
#include <libdevcore/JSON.h>
#include <boost/program_options.hpp>
@@ -83,7 +85,7 @@ public:
{
ErrorReporter errorReporter(m_errors);
shared_ptr<Scanner> scanner = make_shared<Scanner>(CharStream(_input, ""));
- m_ast = yul::Parser(errorReporter, yul::Dialect::strictAssemblyForEVM()).parse(scanner, false);
+ m_ast = yul::Parser(errorReporter, yul::EVMDialect::strictAssemblyForEVM()).parse(scanner, false);
if (!m_ast || !errorReporter.errors().empty())
{
cout << "Error parsing source." << endl;
@@ -96,7 +98,7 @@ public:
errorReporter,
EVMVersion::byzantium(),
langutil::Error::Type::SyntaxError,
- Dialect::strictAssemblyForEVM()
+ EVMDialect::strictAssemblyForEVM()
);
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
{