Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet_Q4_Groupe_O4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lepl1503-2020-groupe-O4
Projet_Q4_Groupe_O4
Commits
65aa251e
Commit
65aa251e
authored
May 15, 2020
by
Louis Malevez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Cunit.c
parent
d5257346
Pipeline
#10416
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
Cunit.c
Cunit.c
+9
-7
No files found.
Cunit.c
View file @
65aa251e
...
@@ -26,15 +26,18 @@ void test_entier(void) // test si les diviseurs premiers retournés par la fonct
...
@@ -26,15 +26,18 @@ void test_entier(void) // test si les diviseurs premiers retournés par la fonct
clear_list_t
(
prime3
);
clear_list_t
(
prime3
);
list_t
*
prime4
=
prime_list
(
2147483647
);
list_t
*
prime4
=
prime_list
(
2147483647
);
CU_ASSERT
(
get_node_t
(
prime4
)
==
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() {
...
@@ -45,6 +48,7 @@ int main() {
CU_initialize_registry
();
CU_initialize_registry
();
CU_pSuite
suite
=
CU_add_suite
(
"maxi_test"
,
0
,
0
);
CU_pSuite
suite
=
CU_add_suite
(
"maxi_test"
,
0
,
0
);
CU_add_test
(
suite
,
"fact_entier"
,
test_entier
);
CU_add_test
(
suite
,
"fact_entier"
,
test_entier
);
CU_add_test
(
suite
,
"fail"
,
test_failed
);
CU_basic_set_mode
(
CU_BRM_VERBOSE
);
CU_basic_set_mode
(
CU_BRM_VERBOSE
);
CU_basic_run_tests
();
CU_basic_run_tests
();
...
@@ -55,5 +59,3 @@ int main() {
...
@@ -55,5 +59,3 @@ int main() {
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment