aboutsummaryrefslogtreecommitdiffstats
path: root/test/boostTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/boostTest.cpp')
-rw-r--r--test/boostTest.cpp58
1 files changed, 18 insertions, 40 deletions
diff --git a/test/boostTest.cpp b/test/boostTest.cpp
index cff0f5c0..d6e75cb9 100644
--- a/test/boostTest.cpp
+++ b/test/boostTest.cpp
@@ -35,16 +35,13 @@
#pragma GCC diagnostic pop
+#include <test/InteractiveTests.h>
#include <test/Options.h>
-#include <test/libsolidity/ASTJSONTest.h>
-#include <test/libsolidity/SyntaxTest.h>
-#include <test/libsolidity/SMTCheckerJSONTest.h>
-#include <test/libyul/YulOptimizerTest.h>
-#include <test/libyul/ObjectCompilerTest.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
+#include <string>
using namespace boost::unit_test;
using namespace dev::solidity::test;
@@ -129,46 +126,26 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
master_test_suite_t& master = framework::master_test_suite();
master.p_name.value = "SolidityTests";
dev::test::Options::get().validate();
- solAssert(registerTests(
- master,
- dev::test::Options::get().testPath / "libsolidity",
- "syntaxTests",
- SyntaxTest::create
- ) > 0, "no syntax tests found");
- solAssert(registerTests(
- master,
- dev::test::Options::get().testPath / "libsolidity",
- "ASTJSON",
- ASTJSONTest::create
- ) > 0, "no JSON AST tests found");
- solAssert(registerTests(
- master,
- dev::test::Options::get().testPath / "libyul",
- "yulOptimizerTests",
- yul::test::YulOptimizerTest::create
- ) > 0, "no Yul Optimizer tests found");
- solAssert(registerTests(
- master,
- dev::test::Options::get().testPath / "libyul",
- "objectCompiler",
- yul::test::ObjectCompilerTest::create
- ) > 0, "no Yul Object compiler tests found");
- if (!dev::test::Options::get().disableSMT)
+
+ // Include the interactive tests in the automatic tests as well
+ for (auto const& ts: g_interactiveTestsuites)
{
- solAssert(registerTests(
- master,
- dev::test::Options::get().testPath / "libsolidity",
- "smtCheckerTests",
- SyntaxTest::create
- ) > 0, "no SMT checker tests found");
+ auto const& options = dev::test::Options::get();
+
+ if (ts.smt && options.disableSMT)
+ continue;
+
+ if (ts.ipc && options.disableIPC)
+ continue;
solAssert(registerTests(
master,
- dev::test::Options::get().testPath / "libsolidity",
- "smtCheckerTestsJSON",
- SMTCheckerTest::create
- ) > 0, "no SMT checker JSON tests found");
+ options.testPath / ts.path,
+ ts.subpath,
+ ts.testCaseCreator
+ ) > 0, std::string("no ") + ts.title + " tests found");
}
+
if (dev::test::Options::get().disableIPC)
{
for (auto suite: {
@@ -189,6 +166,7 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
})
removeTestSuite(suite);
}
+
if (dev::test::Options::get().disableSMT)
removeTestSuite("SMTChecker");