use librtti for worker/queue/resource

This commit is contained in:
Rongsong Shen 2026-02-25 16:56:42 +08:00
parent 532c68e6e1
commit 2ee87d4ee6
23 changed files with 1078 additions and 396 deletions

View file

@ -10,7 +10,10 @@
static void test_kv_int_create()
{
var tab = makeInstance(&kvtab_int64_type, 31, NULL);
kv_params_t params
= { .nslots = 32, .keyops = &int_key_ops, .datakiller = NULL };
var tab = makeInstance(&kvtab_type, &params);
TEST_ASSERT_TRUE(tab != NULL);
@ -19,7 +22,9 @@ static void test_kv_int_create()
static void test_kv_int1()
{
var tab = makeInstance(&kvtab_int64_type, 31, NULL);
kv_params_t params
= { .nslots = 32, .keyops = &int_key_ops, .datakiller = NULL };
var tab = makeInstance(&kvtab_type, &params);
int i;
int rc;
@ -71,7 +76,9 @@ static void my_free(void* p)
static void test_kv_int2()
{
var tab = makeInstance(&kvtab_int64_type, 31, my_free);
kv_params_t params
= { .nslots = 32, .keyops = &int_key_ops, .datakiller = my_free };
var tab = makeInstance(&kvtab_type, &params);
int i;
int rc;
char buf[128];
@ -105,7 +112,9 @@ static void test_kv_int2()
static void test_kv_string1()
{
var tab = makeInstance(&kvtab_string_type, 31, NULL);
kv_params_t params
= { .nslots = 32, .keyops = &string_key_ops, .datakiller = NULL };
var tab = makeInstance(&kvtab_type, &params);
int i;
int rc;
char buf[64];
@ -153,7 +162,9 @@ static void test_kv_string1()
static void test_kv_string_create()
{
var tab = makeInstance(&kvtab_string_type, 31, NULL);
kv_params_t params
= { .nslots = 32, .keyops = &string_key_ops, .datakiller = NULL };
var tab = makeInstance(&kvtab_type, &params);
TEST_ASSERT_TRUE(tab != NULL);