mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-03 15:37:12 +02:00
Update MaxmindDB to current git.
This commit is contained in:
22
vendor/MaxmindDB/t/ipv4_start_cache_t.c
vendored
22
vendor/MaxmindDB/t/ipv4_start_cache_t.c
vendored
@ -1,21 +1,22 @@
|
||||
#include "maxminddb_test_helper.h"
|
||||
|
||||
void test_one_ip(MMDB_s *mmdb, const char *ip, const char *filename,
|
||||
const char *mode_desc)
|
||||
{
|
||||
void test_one_ip(MMDB_s *mmdb,
|
||||
const char *ip,
|
||||
const char *filename,
|
||||
const char *mode_desc) {
|
||||
MMDB_lookup_result_s result =
|
||||
lookup_string_ok(mmdb, ip, filename, mode_desc);
|
||||
|
||||
ok(
|
||||
result.found_entry,
|
||||
"got a result for an IPv4 address included in a larger-than-IPv4 subnet - %s - %s",
|
||||
ip, mode_desc);
|
||||
ok(result.found_entry,
|
||||
"got a result for an IPv4 address included in a larger-than-IPv4 subnet "
|
||||
"- %s - %s",
|
||||
ip,
|
||||
mode_desc);
|
||||
|
||||
data_ok(&result, MMDB_DATA_TYPE_UTF8_STRING, "string value for IP", NULL);
|
||||
}
|
||||
|
||||
void run_tests(int mode, const char *mode_desc)
|
||||
{
|
||||
void run_tests(int mode, const char *mode_desc) {
|
||||
const char *filename = "MaxMind-DB-no-ipv4-search-tree.mmdb";
|
||||
const char *path = test_database_path(filename);
|
||||
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
|
||||
@ -28,8 +29,7 @@ void run_tests(int mode, const char *mode_desc)
|
||||
free(mmdb);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int main(void) {
|
||||
plan(NO_PLAN);
|
||||
for_all_modes(&run_tests);
|
||||
done_testing();
|
||||
|
Reference in New Issue
Block a user