summaryrefslogtreecommitdiff
path: root/source/tests/defer.test.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-03-05 21:10:01 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-03-05 21:10:01 +0100
commita6306300bbe624746d036ba5c017e43472156301 (patch)
tree5394bdb66c9acd53f44a6465863e114e0489447e /source/tests/defer.test.c
parentb6e6d56dc5ab4e5071f4cbca2a44f707f61356f9 (diff)
downloadkit-a6306300bbe624746d036ba5c017e43472156301.zip
Remove defer
Diffstat (limited to 'source/tests/defer.test.c')
-rw-r--r--source/tests/defer.test.c37
1 files changed, 0 insertions, 37 deletions
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