diff options
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 |