diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-03-05 21:10:01 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-03-05 21:10:01 +0100 |
commit | a6306300bbe624746d036ba5c017e43472156301 (patch) | |
tree | 5394bdb66c9acd53f44a6465863e114e0489447e /source/tests | |
parent | b6e6d56dc5ab4e5071f4cbca2a44f707f61356f9 (diff) | |
download | kit-a6306300bbe624746d036ba5c017e43472156301.zip |
Remove defer
Diffstat (limited to 'source/tests')
-rw-r--r-- | source/tests/_exe.c | 1 | ||||
-rw-r--r-- | source/tests/defer.test.c | 37 |
2 files changed, 0 insertions, 38 deletions
diff --git a/source/tests/_exe.c b/source/tests/_exe.c index acbe5c2..1c59ba2 100644 --- a/source/tests/_exe.c +++ b/source/tests/_exe.c @@ -21,7 +21,6 @@ #include "string_ref.test.c" #include "duration.test.c" #include "thread.test.c" -#include "defer.test.c" #include "xml.test.c" #include "http1.test.c" #include "bench.test.c" diff --git a/source/tests/defer.test.c b/source/tests/defer.test.c deleted file mode 100644 index 0eb8557..0000000 --- a/source/tests/defer.test.c +++ /dev/null @@ -1,37 +0,0 @@ -#if defined(__clang__) || defined(__APPLE__) -# include "../kit/defer.h" - -# define KIT_TEST_FILE defer_block -# include "../kit/test.h" - -TEST("defer") { - int defer_ref x = 1; - - { - defer { - x = 2; - }; - - x = 3; - } - - REQUIRE_EQ(x, 2); -} - -TEST("defer capture") { - int defer_ref x = 1; - - { - defer { - if (x == 3) - x = 2; - }; - - x = 3; - } - - REQUIRE_EQ(x, 2); -} - -# undef KIT_TEST_FILE -#endif |