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

@@ -18,11 +18,12 @@
//==============================================================================
#include "../ParsedURL.h"
#include "../../../modules/beast_core/beast_core.h" // for UnitTest
#include "../../strings/String.h"
#include "joyent_parser.h"
#include <cstdint>
namespace beast {
ParsedURL::ParsedURL ()
@@ -146,35 +147,4 @@ URL ParsedURL::url () const
return m_url;
}
//------------------------------------------------------------------------------
class ParsedURLTests : public UnitTest
{
public:
void checkURL (String const& url)
{
ParsedURL result (url);
expect (result.error () == 0);
expect (result.url ().toString () == url);
}
void testURL ()
{
beginTestCase ("parse URL");
checkURL ("http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference.html");
}
void runTest ()
{
testURL ();
}
ParsedURLTests () : UnitTest ("ParsedURL", "beast", runManual)
{
}
};
static ParsedURLTests parsedURLTests;
}