| 1234567891011121314151617181920212223242526272829303132333435 |
- #include <stdio.h>
- #include <zivuos.h>
- void dump(zv_vector_t *self) {
- printf("Vector length: %u\n", self->length);
-
- zv_vector_container_t *current = self->first;
- size_t count = 0;
- while (current != NULL) {
- printf("Item %u: %s\n", count++, current->content.string);
- current = current->next;
- }
-
- puts("Dump end");
- puts("");
- }
- int main() {
- puts("ZivuOS vector test unit.");
- zv_universal_t first = { .string = "UwU" };
- zv_universal_t second = { .string = "OwO" };
- zv_vector_t *test = zv_vector_create();
- dump(test);
- zv_vector_append(test, first);
- zv_vector_append(test, second);
- dump(test);
- return 0;
- }
|