From 49eaf7c3fd98a2983ac7c9f0994fbca0b73a33c1 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 6 Mar 2018 20:45:34 +0100 Subject: Infrastructure for extracting syntax tests in separate test files. --- test/boostTest.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/boostTest.cpp') diff --git a/test/boostTest.cpp b/test/boostTest.cpp index a3cc51c5..fa9df3fd 100644 --- a/test/boostTest.cpp +++ b/test/boostTest.cpp @@ -36,6 +36,7 @@ #pragma GCC diagnostic pop #include +#include using namespace boost::unit_test; @@ -54,6 +55,7 @@ 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::solidity::test::SyntaxTester::registerTests(); if (dev::test::Options::get().disableIPC) { for (auto suite: { -- cgit v1.2.3 From 3232561d979954f0625102d33cf042fc5eda7211 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Mon, 12 Mar 2018 13:33:37 +0100 Subject: Refactoring; fuse SyntaxTestParser and SyntaxTester to SyntaxTest. --- test/boostTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/boostTest.cpp') diff --git a/test/boostTest.cpp b/test/boostTest.cpp index fa9df3fd..e557ff95 100644 --- a/test/boostTest.cpp +++ b/test/boostTest.cpp @@ -36,7 +36,7 @@ #pragma GCC diagnostic pop #include -#include +#include using namespace boost::unit_test; @@ -55,7 +55,11 @@ 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::solidity::test::SyntaxTester::registerTests(); + solAssert(dev::solidity::test::SyntaxTest::registerTests( + master, + dev::test::Options::get().testPath / "libsolidity", + "syntaxTests" + ) > 0, "no syntax tests found"); if (dev::test::Options::get().disableIPC) { for (auto suite: { -- cgit v1.2.3 From 1882c508c6d3ef46847ba23d06689ea17b01ccb5 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 14 Mar 2018 10:45:01 +0100 Subject: soltest: force the use of the --testpath option for soltest with an explicit error. --- test/boostTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/boostTest.cpp') diff --git a/test/boostTest.cpp b/test/boostTest.cpp index e557ff95..8ad97db3 100644 --- a/test/boostTest.cpp +++ b/test/boostTest.cpp @@ -55,6 +55,10 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { master_test_suite_t& master = framework::master_test_suite(); master.p_name.value = "SolidityTests"; + solAssert( + !dev::test::Options::get().testPath.empty(), + "No test path specified. The --testpath argument is required." + ); solAssert(dev::solidity::test::SyntaxTest::registerTests( master, dev::test::Options::get().testPath / "libsolidity", -- cgit v1.2.3 From d63d41b3b545b0e13e2ee7f880120b2ba852c654 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 14 Mar 2018 12:04:04 +0100 Subject: test: Rename test/TestHelper.* to test/Options.* and add Options::validate(). --- test/boostTest.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/boostTest.cpp') diff --git a/test/boostTest.cpp b/test/boostTest.cpp index 8ad97db3..f16973b5 100644 --- a/test/boostTest.cpp +++ b/test/boostTest.cpp @@ -35,7 +35,7 @@ #pragma GCC diagnostic pop -#include +#include #include using namespace boost::unit_test; @@ -55,10 +55,7 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { master_test_suite_t& master = framework::master_test_suite(); master.p_name.value = "SolidityTests"; - solAssert( - !dev::test::Options::get().testPath.empty(), - "No test path specified. The --testpath argument is required." - ); + dev::test::Options::get().validate(); solAssert(dev::solidity::test::SyntaxTest::registerTests( master, dev::test::Options::get().testPath / "libsolidity", -- cgit v1.2.3