mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -21,7 +21,7 @@
|
||||
#include "../../../BeastConfig.h"
|
||||
#endif
|
||||
|
||||
#include "../../../modules/beast_core/beast_core.h" // for UnitTest
|
||||
#include "../../unit_test/suite.h"
|
||||
|
||||
#include "../bind_handler.h"
|
||||
#include "../enable_wait_for_async.h"
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace beast {
|
||||
|
||||
class enable_wait_for_async_Tests : public UnitTest
|
||||
class enable_wait_for_async_test : public unit_test::suite
|
||||
{
|
||||
public:
|
||||
typedef boost::system::error_code error_code;
|
||||
@@ -89,22 +89,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
beginTestCase ("wait_for_async");
|
||||
owner o;
|
||||
o();
|
||||
expect (o.notified);
|
||||
}
|
||||
|
||||
void runTest()
|
||||
void run()
|
||||
{
|
||||
test();
|
||||
}
|
||||
|
||||
enable_wait_for_async_Tests() : UnitTest ("enable_wait_for_async", "beast")
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static enable_wait_for_async_Tests enable_wait_for_async_tests;
|
||||
BEAST_DEFINE_TESTSUITE(enable_wait_for_async,asio,beast);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user