This commit is contained in:
@@ -24,5 +24,30 @@ jobs:
|
|||||||
tests/test_basics.c
|
tests/test_basics.c
|
||||||
-lcriterion -fsanitize=address -g
|
-lcriterion -fsanitize=address -g
|
||||||
|
|
||||||
- name: Tests
|
- name: Test list_append
|
||||||
run: ./test
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_append"
|
||||||
|
|
||||||
|
- name: Test list_count
|
||||||
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_count"
|
||||||
|
|
||||||
|
- name: Test list_insert
|
||||||
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_insert"
|
||||||
|
|
||||||
|
- name: Test list_get
|
||||||
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_get"
|
||||||
|
|
||||||
|
- name: Test list_find
|
||||||
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_find"
|
||||||
|
|
||||||
|
- name: Test list_delete_at
|
||||||
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_delete_at"
|
||||||
|
|
||||||
|
- name: Test list_remove
|
||||||
|
if: success() || failure()
|
||||||
|
run: ./run_tests --filter "basics_suite/test_list_remove"
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
#include <criterion/internal/assert.h>
|
#include <criterion/internal/assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../Chains_across_the_Island/Fundamentals/basics/basics.h"
|
#include "../Chains_across_the_Island/Fundamentals/basics/basics.h"
|
||||||
|
#include <stdio.h>
|
||||||
// Test pour list_append
|
// Test pour list_append
|
||||||
Test(basics_suite, test_append) {
|
Test(basics_suite, test_append) {
|
||||||
struct list *l = NULL;
|
struct list *l = NULL;
|
||||||
@@ -31,6 +31,7 @@ Test(basics_suite, test_count) {
|
|||||||
l = list_append(l, 30);
|
l = list_append(l, 30);
|
||||||
|
|
||||||
cr_assert_eq(list_count(l), 3, "La liste doit contenir 3 éléments.");
|
cr_assert_eq(list_count(l), 3, "La liste doit contenir 3 éléments.");
|
||||||
|
|
||||||
list_destroy(l);
|
list_destroy(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +70,6 @@ Test(basics_suite, test_get){
|
|||||||
cr_assert_null(rslt, "Le pointeur doit etre null");
|
cr_assert_null(rslt, "Le pointeur doit etre null");
|
||||||
|
|
||||||
list_destroy(l);
|
list_destroy(l);
|
||||||
// On ne détruit SURTOUT PAS rslt ici, car il appartient déjà à l !
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Test list_find
|
//Test list_find
|
||||||
|
|||||||
Reference in New Issue
Block a user