forked from lei.chen/myxce
use librtti for worker/queue/resource
This commit is contained in:
parent
532c68e6e1
commit
2ee87d4ee6
23 changed files with 1078 additions and 396 deletions
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
static void test_zarray_create()
|
||||
{
|
||||
var a = makeInstance(&xzarray_type, 4, NULL);
|
||||
xzarray_params_t params = { .delta = 4, .datakiller = NULL };
|
||||
var a = makeInstance(&xzarray_type, ¶ms);
|
||||
|
||||
TEST_ASSERT_TRUE(a != NULL);
|
||||
|
||||
|
|
@ -18,10 +19,11 @@ static void test_zarray_create()
|
|||
|
||||
static void test_zarray_store()
|
||||
{
|
||||
var a = makeInstance(&xzarray_type, 4, NULL);
|
||||
int idx;
|
||||
int rc;
|
||||
char* p = NULL;
|
||||
xzarray_params_t params = { .delta = 4, .datakiller = NULL };
|
||||
var a = makeInstance(&xzarray_type, ¶ms);
|
||||
int idx;
|
||||
int rc;
|
||||
char* p = NULL;
|
||||
|
||||
TEST_ASSERT_TRUE(a != NULL);
|
||||
|
||||
|
|
@ -39,9 +41,10 @@ static void test_zarray_store()
|
|||
|
||||
static void test_zarray_put()
|
||||
{
|
||||
var a = makeInstance(&xzarray_type, 4, NULL);
|
||||
int rc, idx = 10;
|
||||
char* p;
|
||||
xzarray_params_t params = { .delta = 4, .datakiller = NULL };
|
||||
var a = makeInstance(&xzarray_type, ¶ms);
|
||||
int rc, idx = 10;
|
||||
char* p;
|
||||
|
||||
TEST_ASSERT_TRUE(a != NULL);
|
||||
|
||||
|
|
@ -58,13 +61,14 @@ static void test_zarray_put()
|
|||
|
||||
static void test_zarray_put_get_vec()
|
||||
{
|
||||
var a = makeInstance(&xzarray_type, 4, NULL);
|
||||
int idxs[5] = { 1, 3, 5, 7, 9 };
|
||||
void* vals[5] = { (void*)(long)2, (void*)(long)4, (void*)(long)6,
|
||||
(void*)(long)8, (void*)(long)10 };
|
||||
void* vals1[5];
|
||||
int i;
|
||||
int rc;
|
||||
xzarray_params_t params = { .delta = 4, .datakiller = NULL };
|
||||
var a = makeInstance(&xzarray_type, ¶ms);
|
||||
int idxs[5] = { 1, 3, 5, 7, 9 };
|
||||
void* vals[5] = { (void*)(long)2, (void*)(long)4, (void*)(long)6,
|
||||
(void*)(long)8, (void*)(long)10 };
|
||||
void* vals1[5];
|
||||
int i;
|
||||
int rc;
|
||||
|
||||
TEST_ASSERT_TRUE(a != NULL);
|
||||
|
||||
|
|
@ -83,12 +87,13 @@ static void test_zarray_put_get_vec()
|
|||
|
||||
static void test_zarray_iter()
|
||||
{
|
||||
var a = makeInstance(&xzarray_type, 4, NULL);
|
||||
int idxs[5] = { 1, 3, 5, 7, 9 };
|
||||
int vals[5] = { 2, 4, 6, 8, 10 };
|
||||
int i;
|
||||
iterator_t it;
|
||||
int rc;
|
||||
xzarray_params_t params = { .delta = 4, .datakiller = NULL };
|
||||
var a = makeInstance(&xzarray_type, ¶ms);
|
||||
int idxs[5] = { 1, 3, 5, 7, 9 };
|
||||
int vals[5] = { 2, 4, 6, 8, 10 };
|
||||
int i;
|
||||
iterator_t it;
|
||||
int rc;
|
||||
|
||||
TEST_ASSERT_TRUE(a != NULL);
|
||||
|
||||
|
|
@ -131,11 +136,12 @@ static void my_killer(void* p)
|
|||
|
||||
static void test_zarray_clear()
|
||||
{
|
||||
var a = makeInstance(&xzarray_type, 4, my_killer);
|
||||
char* s = strdup("Hello");
|
||||
char* d = NULL;
|
||||
int idx = 31;
|
||||
int rc;
|
||||
xzarray_params_t params = { .delta = 4, .datakiller = my_killer };
|
||||
var a = makeInstance(&xzarray_type, ¶ms);
|
||||
char* s = strdup("Hello");
|
||||
char* d = NULL;
|
||||
int idx = 31;
|
||||
int rc;
|
||||
|
||||
TEST_ASSERT_TRUE(a != NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue