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 547019bd1b
commit a865149c65
411 changed files with 4577 additions and 5591 deletions

View File

@@ -17,15 +17,15 @@
*/
//==============================================================================
#include "../../../beast/beast/unit_test/suite.h"
namespace ripple {
class JsonCppTests : public beast::UnitTest
class JsonCpp_test : public beast::unit_test::suite
{
public:
void testBadJson ()
{
beginTestCase ("bad input");
char const* s (
"{\"method\":\"ledger\",\"params\":[{\"ledger_index\":1e300}]}"
);
@@ -37,16 +37,12 @@ public:
pass ();
}
void runTest ()
void run ()
{
testBadJson ();
}
JsonCppTests () : UnitTest ("JsonCpp", "ripple")
{
}
};
static JsonCppTests jsonCppTests;
BEAST_DEFINE_TESTSUITE(JsonCpp,json,ripple);
} // namespace ripple
} // ripple