Simplify installation procedure
[cgds.git] / test / t.Stack.c
index 364c344..ba53e9f 100644 (file)
@@ -1,9 +1,9 @@
 #include <stdlib.h>
 #include "cgds/Stack.h"
-#include "test/helpers.h"
-#include "test/lut.h"
+#include "helpers.h"
+#include "lut.h"
 
-void t_stack_clear() //FTEST
+void t_stack_clear()
 {
        Stack* s = stack_new(int);
 
@@ -17,7 +17,7 @@ void t_stack_clear() //FTEST
        stack_destroy(s);
 }
 
-void t_stack_size() //FTEST
+void t_stack_size()
 {
        Stack* s = stack_new(int);
 
@@ -38,13 +38,14 @@ void t_stack_size() //FTEST
        stack_destroy(s);
 }
 
-void t_stack_push_pop_basic() //FTEST
+void t_stack_push_pop_basic()
 {
 
        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))
@@ -60,7 +61,7 @@ void t_stack_push_pop_basic() //FTEST
        stack_destroy(s);
 }
 
-void t_stack_push_pop_evolved() //FTEST
+void t_stack_push_pop_evolved()
 {
        Stack* s = stack_new(StructTest1);
 
@@ -107,7 +108,7 @@ void t_stack_push_pop_evolved() //FTEST
        stack_destroy(s);
 }
 
-void t_stack_copy() //FTEST
+void t_stack_copy()
 {
        int n = 10;
 
@@ -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++)
        {