diff options
author | Dmitri Pal <dpal@redhat.com> | 2009-07-02 12:52:32 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-07-02 20:02:27 -0400 |
commit | 767ce0e4fdc9dee525561314311a461e77883b9b (patch) | |
tree | 6cad162c0b5b956b0b82ed95ecd005ee0b263366 /collection/collection_stack_ut.c | |
parent | 48bb3991b40a1a70b1d806ea99d9dcaeb900e380 (diff) | |
download | ding-libs2-767ce0e4fdc9dee525561314311a461e77883b9b.tar.gz ding-libs2-767ce0e4fdc9dee525561314311a461e77883b9b.tar.xz ding-libs2-767ce0e4fdc9dee525561314311a461e77883b9b.zip |
Changing function names for collection API.
Patch prepends prefix "col_" to all
functions related to collection.
This caused some formatiing issues
so the alignement was addressed too.
Diffstat (limited to 'collection/collection_stack_ut.c')
-rw-r--r-- | collection/collection_stack_ut.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/collection/collection_stack_ut.c b/collection/collection_stack_ut.c index 667af10..b3337c7 100644 --- a/collection/collection_stack_ut.c +++ b/collection/collection_stack_ut.c @@ -42,51 +42,51 @@ int stack_test() printf("\n\nSTACK TEST!!!.\n\n\n"); - if ((error = create_stack(&stack)) || - (error = push_str_property(stack, "item1", "value 1", 0)) || - (error = push_int_property(stack, "item2", -1)) || - (error = push_unsigned_property(stack, "item3", 1)) || - (error = push_long_property(stack, "item4", 100)) || - (error = push_ulong_property(stack, "item5", 1000)) || - (error = push_double_property(stack, "item6", 1.1)) || - (error = push_bool_property(stack, "item7", 1)) || - (error = push_binary_property(stack, "item8", binary_dump, sizeof(binary_dump)))) { + if ((error = col_create_stack(&stack)) || + (error = col_push_str_property(stack, "item1", "value 1", 0)) || + (error = col_push_int_property(stack, "item2", -1)) || + (error = col_push_unsigned_property(stack, "item3", 1)) || + (error = col_push_long_property(stack, "item4", 100)) || + (error = col_push_ulong_property(stack, "item5", 1000)) || + (error = col_push_double_property(stack, "item6", 1.1)) || + (error = col_push_bool_property(stack, "item7", 1)) || + (error = col_push_binary_property(stack, "item8", binary_dump, sizeof(binary_dump)))) { printf("Failed to push property. Error %d\n", error); - destroy_collection(stack); + col_destroy_collection(stack); return error; } - debug_collection(stack, COL_TRAVERSE_DEFAULT); + col_debug_collection(stack, COL_TRAVERSE_DEFAULT); printf("Swapping last two items by popping and pushing them back.\n"); - if ((error = pop_item(stack, &item1)) || - (error = pop_item(stack, &item2))) { + if ((error = col_pop_item(stack, &item1)) || + (error = col_pop_item(stack, &item2))) { printf("Failed to pop items. Error %d\n", error); - destroy_collection(stack); + col_destroy_collection(stack); return error; } printf("\nPopped two last items.\n"); - debug_collection(stack, COL_TRAVERSE_DEFAULT); + col_debug_collection(stack, COL_TRAVERSE_DEFAULT); printf("\nLast item.\n"); - debug_item(item1); + col_debug_item(item1); printf("\nPrevious item.\n"); - debug_item(item2); + col_debug_item(item2); - if ((error = push_item(stack, item1)) || - (error = push_item(stack, item2))) { + if ((error = col_push_item(stack, item1)) || + (error = col_push_item(stack, item2))) { printf("Failed to pop or push items. Error %d\n", error); - destroy_collection(stack); + col_destroy_collection(stack); return error; } printf("\n\nPushed two items again in reverse order.\n\n"); - debug_collection(stack, COL_TRAVERSE_DEFAULT); - destroy_collection(stack); + col_debug_collection(stack, COL_TRAVERSE_DEFAULT); + col_destroy_collection(stack); TRACE_FLOW_NUMBER("stack_test. Returning", error); printf("\n\nEND OF STACK TEST!!!.\n\n"); |