New unit_test framework:

* Header-only!
* No external dependencies or other beast modules
* Compilation options allow for:
  - Stand-alone application to run a single test suite
  - Stand-alone application to run a set of test suites
  - Global suite of tests inline with the host application
  - Disable test suite generation completely
* Existing tests reworked to use the new classes
This commit is contained in:
Vinnie Falco
2014-03-20 17:25:39 -07:00
parent 0bb6171a85
commit f63cf33118
114 changed files with 3259 additions and 4312 deletions

View File

@@ -23,12 +23,12 @@
#include "../utility.h"
#include "../../../modules/beast_core/beast_core.h" // for UnitTest
#include "../../unit_test/suite.h"
namespace beast {
namespace asio {
class integer_sequence_Tests : public UnitTest
class integer_sequence_test : public unit_test::suite
{
public:
template <class AtContainer, class T, T... I>
@@ -41,10 +41,8 @@ public:
return std::make_tuple (std::get <I> (t)...);
}
void runTest()
void run()
{
beginTestCase ("call");
// Code from
// http://llvm.org/svn/llvm-project/libcxx/trunk/test/utilities/intseq/intseq.general/integer_seq.pass.cpp
@@ -103,13 +101,9 @@ public:
expect ( tsizemix == std::make_tuple ( 11, 11, 12, 13, 15 ));
pass();
}
integer_sequence_Tests() : UnitTest ("integer_sequence", "beast")
{
}
};
static integer_sequence_Tests integer_sequence_tests;
BEAST_DEFINE_TESTSUITE(integer_sequence,cxx14,beast);
}
}