aboutsummaryrefslogtreecommitdiff
path: root/test/test_itc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_itc.c')
-rw-r--r--test/test_itc.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/test_itc.c b/test/test_itc.c
index 6af69c0..61d98c0 100644
--- a/test/test_itc.c
+++ b/test/test_itc.c
@@ -14,7 +14,7 @@ static void test_itc_alloc_free(void)
TEST(ctx == NULL);
}
-static void test_itc_inject_retrive(void)
+static void test_itc_inject_retrieve(void)
{
unsigned int i;
unsigned int *e[3] = {NULL};
@@ -30,19 +30,19 @@ static void test_itc_inject_retrive(void)
TEST(itc_inject(ctx, 0, e[0]) == 0);
TEST(itc_inject(ctx, 0, e[1]) == 0);
TEST(itc_inject(ctx, 0, e[2]) == 0);
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 0);
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 1);
TEST(itc_inject(ctx, 0, e[0]) == 0);
TEST(itc_inject(ctx, 0, e[1]) == 0);
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 2);
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 0);
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 1);
- TEST(itc_retrive(ctx, 0) == NULL);
+ TEST(itc_retrieve(ctx, 0) == NULL);
TEST(itc_inject(ctx, 0, e[0]) == 0);
itc_free(&ctx, free);
@@ -52,11 +52,11 @@ static void test_itc_inject_retrive(void)
TEST(itc_inject(ctx, 0, e[0]) == 0);
TEST(itc_inject(ctx, 0, e[1]) == 0);
TEST(itc_inject(ctx, 0, e[2]));
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 0);
- TEST((r = itc_retrive(ctx, 0)) != NULL);
+ TEST((r = itc_retrieve(ctx, 0)) != NULL);
TEST(*r == 1);
- TEST(itc_retrive(ctx, 0) == NULL);
+ TEST(itc_retrieve(ctx, 0) == NULL);
itc_free(&ctx, free);
for (i = 0; i < sizeof(e)/sizeof(e[0]); i++) {
free(e[i]);
@@ -80,10 +80,10 @@ static void test_itc_queued_slots(void)
itc_inject(ctx, 0, ctx);
TEST(itc_get_queued(ctx) == 2);
TEST(itc_get_slots(ctx) == 3);
- itc_retrive(ctx, 0);
+ itc_retrieve(ctx, 0);
TEST(itc_get_queued(ctx) == 1);
TEST(itc_get_slots(ctx) == 3);
- itc_retrive(ctx, 0);
+ itc_retrieve(ctx, 0);
TEST(itc_get_queued(ctx) == 0);
TEST(itc_get_slots(ctx) == 3);
itc_free(&ctx, NULL);
@@ -96,16 +96,16 @@ static void *test_itc_wait_empty_th(void *_ctx)
sleep(2);
TEST(ctx != NULL);
- TEST((e = itc_retrive(ctx, 0)) != NULL);
+ TEST((e = itc_retrieve(ctx, 0)) != NULL);
TEST(*e == 0);
free(e);
- TEST((e = itc_retrive(ctx, 0)) != NULL);
+ TEST((e = itc_retrieve(ctx, 0)) != NULL);
TEST(*e == 1);
free(e);
- TEST((e = itc_retrive(ctx, 0)) != NULL);
+ TEST((e = itc_retrieve(ctx, 0)) != NULL);
TEST(*e == 2);
free(e);
- TEST(itc_retrive(ctx, 0) == NULL);
+ TEST(itc_retrieve(ctx, 0) == NULL);
return NULL;
}
@@ -131,7 +131,7 @@ static void test_itc_wait_empty(void)
itc_wait_empty(ctx);
sleep(2);
TEST(itc_get_queued(ctx) == 0);
- TEST(itc_retrive(ctx, 0) == NULL);
+ TEST(itc_retrieve(ctx, 0) == NULL);
itc_free(&ctx, NULL);
}
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
(void)argc;
(void)argv;
test_itc_alloc_free();
- test_itc_inject_retrive();
+ test_itc_inject_retrieve();
test_itc_queued_slots();
test_itc_wait_empty();
test_itc_discard_all();