summaryrefslogtreecommitdiff
path: root/source/tests
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-11 19:48:38 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-11 19:48:38 +0200
commitcf853bea908830194065349f3a8a75e163aea5b9 (patch)
tree25ed56d959ca1e929cb3967719ac9e9a2a37e809 /source/tests
parent782d97aa2940f849282b52fa19b26fbf0970b966 (diff)
downloadkit-cf853bea908830194065349f3a8a75e163aea5b9.zip
Update tests
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/_static.c35
-rw-r--r--source/tests/array_ref.test.c2
-rw-r--r--source/tests/async_function.test.c2
-rw-r--r--source/tests/atomic.test.c2
-rw-r--r--source/tests/bench.test.c2
-rw-r--r--source/tests/bigint.test.c1
-rw-r--r--source/tests/condition_variable.test.c2
-rw-r--r--source/tests/duration.test.c2
-rw-r--r--source/tests/dynamic_array.test.c2
-rw-r--r--source/tests/file.test.c2
-rw-r--r--source/tests/input_buffer.test.c2
-rw-r--r--source/tests/input_stream.test.c2
-rw-r--r--source/tests/lower_bound.test.c2
-rw-r--r--source/tests/main.test.c2
-rw-r--r--source/tests/mersenne_twister_64.test.c2
-rw-r--r--source/tests/move_back.test.c2
-rw-r--r--source/tests/mutex.test.c2
-rw-r--r--source/tests/secure_random.test.c2
-rw-r--r--source/tests/sha256.test.c2
-rw-r--r--source/tests/string_ref.test.c2
-rw-r--r--source/tests/test_cpp.cpp2
-rw-r--r--source/tests/test_signals.cpp2
-rw-r--r--source/tests/test_too_many_assertions.c2
-rw-r--r--source/tests/test_too_many_tests.c2
-rw-r--r--source/tests/thread.test.c2
25 files changed, 47 insertions, 35 deletions
diff --git a/source/tests/_static.c b/source/tests/_static.c
index 9975a53..9e4451d 100644
--- a/source/tests/_static.c
+++ b/source/tests/_static.c
@@ -1,56 +1,21 @@
#define KIT_TEST_IMPLEMENTATION
#include "main.test.c"
-#undef KIT_TEST_FILE
#include "array_ref.test.c"
-
-#undef KIT_TEST_FILE
#include "async_function.test.c"
-
-#undef KIT_TEST_FILE
#include "bigint.test.c"
-
-#undef KIT_TEST_FILE
#include "condition_variable.test.c"
-
-#undef KIT_TEST_FILE
#include "dynamic_array.test.c"
-
-#undef KIT_TEST_FILE
#include "file.test.c"
-
-#undef KIT_TEST_FILE
#include "input_buffer.test.c"
-
-#undef KIT_TEST_FILE
#include "input_stream.test.c"
-
-#undef KIT_TEST_FILE
#include "lower_bound.test.c"
-
-#undef KIT_TEST_FILE
#include "mersenne_twister_64.test.c"
-
-#undef KIT_TEST_FILE
#include "move_back.test.c"
-
-#undef KIT_TEST_FILE
#include "mutex.test.c"
-
-#undef KIT_TEST_FILE
#include "secure_random.test.c"
-
-#undef KIT_TEST_FILE
#include "sha256.test.c"
-
-#undef KIT_TEST_FILE
#include "string_ref.test.c"
-
-#undef KIT_TEST_FILE
#include "duration.test.c"
-
-#undef KIT_TEST_FILE
#include "thread.test.c"
-
-#undef KIT_TEST_FILE
#include "bench.test.c"
diff --git a/source/tests/array_ref.test.c b/source/tests/array_ref.test.c
index 06e098c..2037bed 100644
--- a/source/tests/array_ref.test.c
+++ b/source/tests/array_ref.test.c
@@ -53,3 +53,5 @@ TEST("array ref different element sizes") {
REQUIRE(AR_COMPARE(foo_ref, bar_ref, compare) > 0);
REQUIRE(AR_COMPARE(bar_ref, foo_ref, compare) < 0);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/async_function.test.c b/source/tests/async_function.test.c
index 2e62f64..9f90474 100644
--- a/source/tests/async_function.test.c
+++ b/source/tests/async_function.test.c
@@ -130,3 +130,5 @@ TEST("coroutine nested generator") {
AF_EXECUTE(promise);
REQUIRE(AF_FINISHED(promise));
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/atomic.test.c b/source/tests/atomic.test.c
index 8bf2c95..efb5a61 100644
--- a/source/tests/atomic.test.c
+++ b/source/tests/atomic.test.c
@@ -216,3 +216,5 @@ TEST("atomic int64 concurrency") {
REQUIRE(atomic_load_explicit(&foo, memory_order_relaxed) == 42);
REQUIRE(atomic_load_explicit(&bar, memory_order_relaxed) == 43);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/bench.test.c b/source/tests/bench.test.c
index a5536f4..f5d28aa 100644
--- a/source/tests/bench.test.c
+++ b/source/tests/bench.test.c
@@ -38,3 +38,5 @@ BENCHMARK("bar") {
}
BENCHMARK("empty") { }
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/bigint.test.c b/source/tests/bigint.test.c
index ad0d076..8efea16 100644
--- a/source/tests/bigint.test.c
+++ b/source/tests/bigint.test.c
@@ -106,3 +106,4 @@ TEST("bigint div") {
"foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo")));
}
+#undef KIT_TEST_FILE
diff --git a/source/tests/condition_variable.test.c b/source/tests/condition_variable.test.c
index 59882bf..fc2edd4 100644
--- a/source/tests/condition_variable.test.c
+++ b/source/tests/condition_variable.test.c
@@ -82,3 +82,5 @@ TEST("condition variable") {
REQUIRE(ok);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/duration.test.c b/source/tests/duration.test.c
index 9613583..1bdb68b 100644
--- a/source/tests/duration.test.c
+++ b/source/tests/duration.test.c
@@ -17,3 +17,5 @@ static void kit_sleep(int ms) {
TEST("test duration") {
kit_sleep(100);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/dynamic_array.test.c b/source/tests/dynamic_array.test.c
index 8aa7f42..a1c0ebc 100644
--- a/source/tests/dynamic_array.test.c
+++ b/source/tests/dynamic_array.test.c
@@ -172,3 +172,5 @@ TEST("dynamic array of ints") {
DA_DESTROY(v);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/file.test.c b/source/tests/file.test.c
index 94e8ed3..0ca7b91 100644
--- a/source/tests/file.test.c
+++ b/source/tests/file.test.c
@@ -216,3 +216,5 @@ TEST("file remove folder") { }
TEST("file remove recursive") { }
TEST("file enum folder") { }
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/input_buffer.test.c b/source/tests/input_buffer.test.c
index bfbcaef..d37ebb6 100644
--- a/source/tests/input_buffer.test.c
+++ b/source/tests/input_buffer.test.c
@@ -103,3 +103,5 @@ TEST("input buffer read integer twice") {
ib_destroy(fourth);
is_destroy(in);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/input_stream.test.c b/source/tests/input_stream.test.c
index 4b609b9..72e43d5 100644
--- a/source/tests/input_stream.test.c
+++ b/source/tests/input_stream.test.c
@@ -42,3 +42,5 @@ TEST("input stream wrap file") {
fclose(f);
file_remove(SZ("_kit_temp"));
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/lower_bound.test.c b/source/tests/lower_bound.test.c
index ea6e72d..d709446 100644
--- a/source/tests/lower_bound.test.c
+++ b/source/tests/lower_bound.test.c
@@ -176,3 +176,5 @@ TEST("lower bound ref sixth of five") {
LOWER_BOUND_REF(index, ref, &value, kit_less_int_ref);
REQUIRE(index == 5);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/main.test.c b/source/tests/main.test.c
index d81a8cb..6d439b6 100644
--- a/source/tests/main.test.c
+++ b/source/tests/main.test.c
@@ -7,3 +7,5 @@ int main(int argc, char **argv) {
status = run_benchmarks(argc, argv);
return status;
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/mersenne_twister_64.test.c b/source/tests/mersenne_twister_64.test.c
index a138a41..4d0d97d 100644
--- a/source/tests/mersenne_twister_64.test.c
+++ b/source/tests/mersenne_twister_64.test.c
@@ -36,3 +36,5 @@ TEST("mt64 different seeds") {
REQUIRE(difference_count > MT64_TEST_SIZE / 2);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/move_back.test.c b/source/tests/move_back.test.c
index 18171b5..626850a 100644
--- a/source/tests/move_back.test.c
+++ b/source/tests/move_back.test.c
@@ -146,3 +146,5 @@ TEST("move back ref 3") {
REQUIRE(v[1] == 3);
REQUIRE(v[2] == 5);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/mutex.test.c b/source/tests/mutex.test.c
index c2e5d85..8d52c69 100644
--- a/source/tests/mutex.test.c
+++ b/source/tests/mutex.test.c
@@ -77,3 +77,5 @@ TEST("mutex try lock") {
mtx_destroy(&m);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/secure_random.test.c b/source/tests/secure_random.test.c
index e54edee..efcf327 100644
--- a/source/tests/secure_random.test.c
+++ b/source/tests/secure_random.test.c
@@ -20,3 +20,5 @@ TEST("secure random") {
REQUIRE_EQ(repeats, 0);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/sha256.test.c b/source/tests/sha256.test.c
index 215a73b..cf67c03 100644
--- a/source/tests/sha256.test.c
+++ b/source/tests/sha256.test.c
@@ -40,3 +40,5 @@ TEST("sha256") {
sha256(sizeof text3, text3).v, 1,
SHA256_BLOCK_SIZE, hash3));
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/string_ref.test.c b/source/tests/string_ref.test.c
index a75abc5..a5863df 100644
--- a/source/tests/string_ref.test.c
+++ b/source/tests/string_ref.test.c
@@ -21,3 +21,5 @@ TEST("string literal") {
str_t bar = foo;
(void) bar;
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/test_cpp.cpp b/source/tests/test_cpp.cpp
index 919ebb9..3e88ede 100644
--- a/source/tests/test_cpp.cpp
+++ b/source/tests/test_cpp.cpp
@@ -12,3 +12,5 @@ TEST("bar") {
int main(int argc, char **argv) {
return run_tests(argc, argv);
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/test_signals.cpp b/source/tests/test_signals.cpp
index 0ffd5eb..6b0fb28 100644
--- a/source/tests/test_signals.cpp
+++ b/source/tests/test_signals.cpp
@@ -29,3 +29,5 @@ int main(int argc, char **argv) {
return 0;
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/test_too_many_assertions.c b/source/tests/test_too_many_assertions.c
index a1ce710..ffff093 100644
--- a/source/tests/test_too_many_assertions.c
+++ b/source/tests/test_too_many_assertions.c
@@ -13,3 +13,5 @@ int main(int argc, char **argv) {
return 0;
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/test_too_many_tests.c b/source/tests/test_too_many_tests.c
index 9691e2c..b03a3b2 100644
--- a/source/tests/test_too_many_tests.c
+++ b/source/tests/test_too_many_tests.c
@@ -14,3 +14,5 @@ int main(int argc, char **argv) {
return 0;
}
+
+#undef KIT_TEST_FILE
diff --git a/source/tests/thread.test.c b/source/tests/thread.test.c
index b8069da..46c9597 100644
--- a/source/tests/thread.test.c
+++ b/source/tests/thread.test.c
@@ -89,3 +89,5 @@ TEST("thread detach") {
struct timespec t = { .tv_sec = 0, .tv_nsec = 10000000 };
thrd_sleep(&t, NULL);
}
+
+#undef KIT_TEST_FILE