diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ampatree_test.c | 4 | ||||
-rw-r--r-- | test/bench.h | 2 | ||||
-rw-r--r-- | test/bitset_test.c | 4 | ||||
-rw-r--r-- | test/btree_test.c | 11 | ||||
-rw-r--r-- | test/dict_bench.c | 16 | ||||
-rw-r--r-- | test/hash_test.c | 10 | ||||
-rw-r--r-- | test/patree_test.c | 4 | ||||
-rw-r--r-- | test/ring_test.c | 8 | ||||
-rw-r--r-- | test/sem_test.c | 8 | ||||
-rw-r--r-- | test/sorted_array_test.c | 8 | ||||
-rw-r--r-- | test/strindex_test.c | 4 | ||||
-rw-r--r-- | test/test_malloc.c | 7 | ||||
-rw-r--r-- | test/tree_bench.c | 8 | ||||
-rw-r--r-- | test/tree_test.c | 8 | ||||
-rw-r--r-- | test/trie_test.c | 4 |
15 files changed, 54 insertions, 52 deletions
diff --git a/test/ampatree_test.c b/test/ampatree_test.c index 94379f6..1138b39 100644 --- a/test/ampatree_test.c +++ b/test/ampatree_test.c @@ -14,12 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/ampatree.h" + #include <stdarg.h> #include <stdio.h> #include <string.h> -#include "zix/ampatree.h" - static const char* strings[] = { "http://example.org/foo", "http://example.org/bar", diff --git a/test/bench.h b/test/bench.h index 93d4002..3575633 100644 --- a/test/bench.h +++ b/test/bench.h @@ -16,8 +16,8 @@ #define _POSIX_C_SOURCE 199309L -#include <time.h> #include <sys/time.h> +#include <time.h> static inline double elapsed_s(const struct timespec* start, const struct timespec* end) diff --git a/test/bitset_test.c b/test/bitset_test.c index 0fbbcab..dbb7bd7 100644 --- a/test/bitset_test.c +++ b/test/bitset_test.c @@ -14,11 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/bitset.h" + #include <stdarg.h> #include <stdio.h> -#include "zix/bitset.h" - #define N_BITS 256 #define N_ELEMS (ZIX_BITSET_ELEMS(N_BITS)) diff --git a/test/btree_test.c b/test/btree_test.c index 8257add..93a257f 100644 --- a/test/btree_test.c +++ b/test/btree_test.c @@ -14,12 +14,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <limits.h> +#include "zix/btree.h" + +#include "test_malloc.h" + +#include <stdbool.h> +#include <assert.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include <time.h> #ifdef _MSC_VER # define PRIdPTR "Id" @@ -27,9 +31,6 @@ # include <inttypes.h> #endif -#include "test_malloc.h" -#include "zix/zix.h" - static bool expect_failure = false; // Return a pseudo-pseudo-pseudo-random-ish integer with no duplicates diff --git a/test/dict_bench.c b/test/dict_bench.c index 228d25c..03be89e 100644 --- a/test/dict_bench.c +++ b/test/dict_bench.c @@ -16,20 +16,20 @@ #include "bench.h" -#include <ctype.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <glib.h> - #include "zix/ampatree.h" #include "zix/chunk.h" #include "zix/hash.h" #include "zix/patree.h" #include "zix/trie.h" +#include <glib.h> + +#include <ctype.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + static const unsigned seed = 1; static int diff --git a/test/hash_test.c b/test/hash_test.c index 7da514b..a24ae9c 100644 --- a/test/hash_test.c +++ b/test/hash_test.c @@ -14,13 +14,17 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "test_malloc.h" + +#include "zix/common.h" +#include "zix/hash.h" + #include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> #include <stdio.h> #include <string.h> -#include "test_malloc.h" -#include "zix/hash.h" - static bool expect_failure = false; static const char* strings[] = { diff --git a/test/patree_test.c b/test/patree_test.c index c28ec40..19df93f 100644 --- a/test/patree_test.c +++ b/test/patree_test.c @@ -14,12 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/patree.h" + #include <stdarg.h> #include <stdio.h> #include <string.h> -#include "zix/patree.h" - static const char* strings[] = { "http://example.org/foo", "http://example.org/bar", diff --git a/test/ring_test.c b/test/ring_test.c index c1ab0fd..cabf6d3 100644 --- a/test/ring_test.c +++ b/test/ring_test.c @@ -14,14 +14,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/ring.h" +#include "zix/thread.h" + #include <limits.h> #include <stdarg.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> - -#include "zix/ring.h" -#include "zix/thread.h" #define MSG_SIZE 20 diff --git a/test/sem_test.c b/test/sem_test.c index 9dffe1f..ff95664 100644 --- a/test/sem_test.c +++ b/test/sem_test.c @@ -14,14 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "zix/sem.h" #include "zix/thread.h" +#include <stdio.h> +#include <stdlib.h> + static ZixSem sem; static unsigned n_signals = 1024; diff --git a/test/sorted_array_test.c b/test/sorted_array_test.c index f1fa9a8..76745cf 100644 --- a/test/sorted_array_test.c +++ b/test/sorted_array_test.c @@ -14,7 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <limits.h> +#include "zix/common.h" +#include "zix/sorted_array.h" + +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -26,9 +29,6 @@ # include <inttypes.h> #endif -#include "zix/common.h" -#include "zix/sorted_array.h" - static unsigned seed = 1; static int diff --git a/test/strindex_test.c b/test/strindex_test.c index b36f632..f8a5424 100644 --- a/test/strindex_test.c +++ b/test/strindex_test.c @@ -14,12 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/strindex.h" + #include <stdarg.h> #include <stdio.h> #include <string.h> -#include "zix/strindex.h" - static int test_fail(const char* fmt, ...) { diff --git a/test/test_malloc.c b/test/test_malloc.c index 9b430fe..202db30 100644 --- a/test/test_malloc.c +++ b/test/test_malloc.c @@ -16,16 +16,13 @@ #define _GNU_SOURCE +#include "test_malloc.h" + #include <dlfcn.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> -#include <assert.h> -#include <stdio.h> - -#include "test_malloc.h" - static void* (*test_malloc_sys_malloc)(size_t size) = NULL; static size_t test_malloc_n_allocs = 0; diff --git a/test/tree_bench.c b/test/tree_bench.c index 58535e4..df7d703 100644 --- a/test/tree_bench.c +++ b/test/tree_bench.c @@ -16,16 +16,16 @@ #include "bench.h" +#include "zix/zix.h" + +#include <glib.h> + #include <inttypes.h> #include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include <glib.h> - -#include "zix/zix.h" - // #define BENCH_SORTED_ARRAY 1 // Return a pseudo-pseudo-pseudo-random-ish integer with no duplicates diff --git a/test/tree_test.c b/test/tree_test.c index 29fba58..a32a58f 100644 --- a/test/tree_test.c +++ b/test/tree_test.c @@ -14,7 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <limits.h> +#include "zix/tree.h" + +#include "zix/common.h" + +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -26,8 +30,6 @@ # include <inttypes.h> #endif -#include "zix/zix.h" - static unsigned seed = 1; static int diff --git a/test/trie_test.c b/test/trie_test.c index 42bf5dc..4ea6d0d 100644 --- a/test/trie_test.c +++ b/test/trie_test.c @@ -14,12 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/trie.h" + #include <stdarg.h> #include <stdio.h> #include <string.h> -#include "zix/trie.h" - static const char* strings[] = { "http://example.org/foo", "http://example.org/bar", |