summaryrefslogtreecommitdiff
path: root/tests/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/array.c')
-rw-r--r--tests/array.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/array.c b/tests/array.c
index 2c7746f..ddcc0d8 100644
--- a/tests/array.c
+++ b/tests/array.c
@@ -272,7 +272,7 @@ static bool array_test_insert(void)
struct test_t x = { .d = 5 };
struct test_t y = { .d = 2 };
- struct test_t z = { .d = 6 };
+ struct test_t z = { .d = 5464123 };
al_array_push(objects, (struct test_t){ .d = 7 });
al_array_push(objects, (struct test_t){ .d = 9 });
@@ -298,6 +298,14 @@ static bool array_test_insert(void)
al_array_free(objects);
+ al_array_init(objects);
+ al_array_push(objects, z);
+ al_array_insert(objects, 0, x);
+ AL_TEST_EQ(al_array_at(objects, 0).d, x.d, u32);
+ AL_TEST_EQ(al_array_at(objects, 1).d, z.d, u32);
+
+ al_array_free(objects);
+
AL_TEST_END();
}