diff options
-rw-r--r-- | tests/error.c | 6 | ||||
-rw-r--r-- | tests/raytrace.c | 3 | ||||
-rw-r--r-- | tests/warning.c | 14 |
3 files changed, 14 insertions, 9 deletions
diff --git a/tests/error.c b/tests/error.c index fc42476..f1ef6ee 100644 --- a/tests/error.c +++ b/tests/error.c @@ -19,11 +19,13 @@ *************************************************************************/ #include "../libdimension/dimension.h" +#include <stdlib.h> -int main() +int +main() { dmnsn_set_resilience(DMNSN_SEVERITY_LOW); dmnsn_error(DMNSN_SEVERITY_LOW, "This error is expected."); - return 0; + return EXIT_SUCCESS; } diff --git a/tests/raytrace.c b/tests/raytrace.c index ea5b67f..abd4093 100644 --- a/tests/raytrace.c +++ b/tests/raytrace.c @@ -22,7 +22,8 @@ #include <stdlib.h> #include <stdio.h> -int main() { +int +main() { FILE *file; dmnsn_scene *scene; dmnsn_object *sphere, *cube; diff --git a/tests/warning.c b/tests/warning.c index 55735c4..7816cc8 100644 --- a/tests/warning.c +++ b/tests/warning.c @@ -19,24 +19,26 @@ *************************************************************************/ #include "../libdimension/dimension.h" +#include <stdlib.h> -int main() +int +main() { - if (dmnsn_get_resilience() != DMNSN_SEVERITY_MEDIUM) return 1; + if (dmnsn_get_resilience() != DMNSN_SEVERITY_MEDIUM) return EXIT_FAILURE; dmnsn_set_resilience(DMNSN_SEVERITY_LOW); - if (dmnsn_get_resilience() != DMNSN_SEVERITY_LOW) return 1; + if (dmnsn_get_resilience() != DMNSN_SEVERITY_LOW) return EXIT_FAILURE; dmnsn_set_resilience(DMNSN_SEVERITY_MEDIUM); - if (dmnsn_get_resilience() != DMNSN_SEVERITY_MEDIUM) return 1; + if (dmnsn_get_resilience() != DMNSN_SEVERITY_MEDIUM) return EXIT_FAILURE; dmnsn_error(DMNSN_SEVERITY_LOW, "This warning is expected."); dmnsn_set_resilience(DMNSN_SEVERITY_HIGH); - if (dmnsn_get_resilience() != DMNSN_SEVERITY_HIGH) return 1; + if (dmnsn_get_resilience() != DMNSN_SEVERITY_HIGH) return EXIT_FAILURE; dmnsn_error(DMNSN_SEVERITY_LOW, "This warning is expected."); dmnsn_error(DMNSN_SEVERITY_MEDIUM, "This warning is expected."); - return 0; + return EXIT_SUCCESS; } |