improve test/makemain.sh, move queu_pop code to vector class
[cgds.git] / test / t.Stack.c
index 364c344..bb879f9 100644 (file)
@@ -44,7 +44,8 @@ void t_stack_push_pop_basic() //FTEST
        int n = 10;
 
        Stack* s = stack_new(double);
-       for (int i = 0; i < n; i++) stack_push(s, (double) i);
+       for (int i = 0; i < n; i++) 
+               stack_push(s, (double) i);
        // iterate and check values
        double ckValue = n - 1;
        while (!stack_empty(s))
@@ -116,7 +117,7 @@ void t_stack_copy() //FTEST
                stack_push(s, rand() % 42);
        Stack* sc = stack_copy(s);
 
-       lu_assert_int_eq(s->size, sc->size);
+       lu_assert_int_eq(stack_size(s), stack_size(sc));
        int a, b;
        for (int i = 0; i < n; i++)
        {