From 3b573a6a432af1909224ff003cfcaadbc5d84308 Mon Sep 17 00:00:00 2001 From: J08nY Date: Tue, 17 Oct 2017 13:11:50 +0200 Subject: Cleanup includes and test setup/teardown. --- src/gen/gens.c | 1 - src/gen/order.c | 1 - test/src/exhaustive/test_ansi.c | 18 ++---------------- test/src/io/test_input.c | 18 ++---------------- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/gen/gens.c b/src/gen/gens.c index d40de67..2cffbc4 100644 --- a/src/gen/gens.c +++ b/src/gen/gens.c @@ -3,7 +3,6 @@ * Copyright (C) 2017 J08nY */ #include "gens.h" -#include #include "exhaustive/arg.h" #include "point.h" diff --git a/src/gen/order.c b/src/gen/order.c index 6af1f00..b802560 100644 --- a/src/gen/order.c +++ b/src/gen/order.c @@ -3,7 +3,6 @@ * Copyright (C) 2017 J08nY */ #include "order.h" -#include #include "exhaustive/arg.h" #include "io/input.h" diff --git a/test/src/exhaustive/test_ansi.c b/test/src/exhaustive/test_ansi.c index 94c89eb..9497c80 100644 --- a/test/src/exhaustive/test_ansi.c +++ b/test/src/exhaustive/test_ansi.c @@ -9,26 +9,12 @@ #include "gen/field.h" #include "gen/seed.h" #include "math/poly.h" -#include "test/default.h" -#include "test/input.h" #include "test/memory.h" -#include "test/output.h" +#include "test/io.h" #include "util/bits.h" #include "util/memory.h" -void ansi_suite_setup(void) { - default_setup(); - input_setup(); - output_setup(); -} - -void ansi_suite_teardown(void) { - default_teardown(); - input_teardown(); - output_teardown(); -} - -TestSuite(ansi, .init = ansi_suite_setup, .fini = ansi_suite_teardown); +TestSuite(ansi, .init = io_setup, .fini = io_teardown); Test(ansi, test_seed_random) { curve_t curve = {}; diff --git a/test/src/io/test_input.c b/test/src/io/test_input.c index d32d71c..b0ecf0a 100644 --- a/test/src/io/test_input.c +++ b/test/src/io/test_input.c @@ -5,23 +5,9 @@ #include #include "io/input.h" -#include "test/default.h" -#include "test/input.h" -#include "test/output.h" +#include "test/io.h" -void input_suite_setup(void) { - default_setup(); - input_setup(); - output_setup(); -} - -void input_suite_teardown(void) { - default_teardown(); - input_teardown(); - output_teardown(); -} - -TestSuite(input, .init = input_suite_setup, .fini = input_suite_teardown); +TestSuite(input, .init = io_setup, .fini = io_teardown); Test(input, test_prime) { fprintf(write_in, "5\n"); -- cgit v1.2.3-70-g09d2