refactor(test): compile tests into single binary
This commit is contained in:
parent
195eb9eb48
commit
5ff788c108
5 changed files with 578 additions and 418 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,9 @@
|
|||
#define TEST_NO_MAIN
|
||||
#include "acutest.h"
|
||||
#include "tests.h"
|
||||
|
||||
#include "lnm/common.h"
|
||||
#include "lnm/http/route.h"
|
||||
#include "test.h"
|
||||
|
||||
#include "lnm/http/loop.h"
|
||||
|
||||
void test_routing_simple() {
|
||||
lnm_http_router *router;
|
||||
|
|
@ -101,11 +102,3 @@ void test_routing_nest() {
|
|||
|
||||
lnm_http_router_free(r2);
|
||||
}
|
||||
|
||||
TEST_LIST = {
|
||||
{ "routing simple", test_routing_simple },
|
||||
{ "routing star", test_routing_star },
|
||||
{ "routing merge", test_routing_merge },
|
||||
{ "routing nest", test_routing_nest },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
10
test/runner.c
Normal file
10
test/runner.c
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include "acutest.h"
|
||||
#include "tests.h"
|
||||
|
||||
TEST_LIST = {
|
||||
{ "routing simple", test_routing_simple },
|
||||
{ "routing star", test_routing_star },
|
||||
{ "routing merge", test_routing_merge },
|
||||
{ "routing nest", test_routing_nest },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
9
test/tests.h
Normal file
9
test/tests.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef TEST_TESTS
|
||||
#define TEST_TESTS
|
||||
|
||||
void test_routing_simple();
|
||||
void test_routing_star();
|
||||
void test_routing_merge();
|
||||
void test_routing_nest();
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue