- List* L = list_new(double);
-
- list_insert_front(L, 0.0);
- list_insert_back(L, 0.0);
- list_insert_front(L, 0.0);
- lu_assert_int_eq(list_size(L), 3);
-
- list_insert_back(L, 0.0);
- list_insert_before(L, L->tail, 0.0);
- lu_assert_int_eq(list_size(L), 5);
-
- list_insert_after(L, L->head->next, 0.0);
- list_insert_before(L, L->tail->prev, 0.0);
- list_insert_after(L, L->head, 0.0);
- lu_assert_int_eq(list_size(L), 8);
-
- list_set(L, L->head->next, 42);
- list_remove_front(L);
- int a;
- list_get(L->head, a);
- lu_assert_int_eq(a, 42);
- list_remove(L, L->head->next);
- lu_assert_int_eq(list_size(L), 6);
- list_set(L, L->tail, 32);
- list_remove(L, L->tail->prev);
- list_get(L->tail, a);
- lu_assert_int_eq(a, 32);
- lu_assert_int_eq(list_size(L), 5);
-
- list_destroy(L);
+ List* L = list_new(double);
+
+ list_insert_front(L, 0.0);
+ list_insert_back(L, 0.0);
+ list_insert_front(L, 0.0);
+ lu_assert_int_eq(list_size(L), 3);
+
+ list_insert_back(L, 0.0);
+ list_insert_before(L, L->tail, 0.0);
+ lu_assert_int_eq(list_size(L), 5);
+
+ list_insert_after(L, L->head->next, 0.0);
+ list_insert_before(L, L->tail->prev, 0.0);
+ list_insert_after(L, L->head, 0.0);
+ lu_assert_int_eq(list_size(L), 8);
+
+ list_set(L, L->head->next, 42);
+ list_remove_front(L);
+ int a;
+ list_get(L->head, a);
+ lu_assert_int_eq(a, 42);
+ list_remove(L, L->head->next);
+ lu_assert_int_eq(list_size(L), 6);
+ list_set(L, L->tail, 32);
+ list_remove(L, L->tail->prev);
+ list_get(L->tail, a);
+ lu_assert_int_eq(a, 32);
+ lu_assert_int_eq(list_size(L), 5);
+
+ list_destroy(L);