Commit 65aa251e authored by Louis Malevez's avatar Louis Malevez

Update Cunit.c

parent d5257346
Pipeline #10416 passed with stage
in 0 seconds
......@@ -26,15 +26,18 @@ void test_entier(void) // test si les diviseurs premiers retournés par la fonct
clear_list_t(prime3);
list_t *prime4=prime_list(2147483647);
CU_ASSERT(get_node_t(prime4)==2147483647);
clear_list_t(prime4);
clear_list_t(prime4);
}
void test_failed(void) /*Exemple de test qui échouera */
{
list_t *faux=prime_list(666343);
CU_ASSERT(get_node_t(faux)==3);
clear_list_t(faux);
}
}
......@@ -45,6 +48,7 @@ int main() {
CU_initialize_registry();
CU_pSuite suite = CU_add_suite("maxi_test", 0, 0);
CU_add_test(suite, "fact_entier", test_entier);
CU_add_test(suite, "fail",test_failed);
CU_basic_set_mode(CU_BRM_VERBOSE);
CU_basic_run_tests();
......@@ -55,5 +59,3 @@ int main() {
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment