2022-08-29 16:06:39 +02:00
|
|
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
|
|
|
#include "ext/doctest.h"
|
2022-08-29 16:17:42 +02:00
|
|
|
#include "lpmwrapper.hh"
|
2022-08-29 16:06:39 +02:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
TEST_CASE("basic test") {
|
2022-08-29 16:17:42 +02:00
|
|
|
LPMWrapper t;
|
|
|
|
void* ptr = (void*)1;
|
|
|
|
t.insert("127.0.0.1/32", ptr);
|
|
|
|
|
|
|
|
CHECK(t.lookup("127.0.0.1") == ptr);
|
|
|
|
CHECK(t.lookup("127.0.0.2") == 0);
|
2022-08-29 16:06:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|