aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/goto.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-16 12:11:18 +0100
committerlemon <lsof@mailbox.org>2025-11-16 12:11:18 +0100
commit111e71e1511b2abff9176bd6c714c8da796f770e (patch)
tree352b723c9144c844037447bd865a8366378df7a5 /test/goto.c
parentb0c0f2d2d885c5901de08ed08dba9fff079bf6e3 (diff)
basic automated testing
Diffstat (limited to 'test/goto.c')
-rw-r--r--test/goto.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/test/goto.c b/test/goto.c
deleted file mode 100644
index 0ecbf28..0000000
--- a/test/goto.c
+++ /dev/null
@@ -1,25 +0,0 @@
-int crz(int x) {
-/* x <<= 1; while (x < 0) ++x; return x; */
- goto e;
-a:
- return x;
-j:
- ++x;
- goto q;
-b:
- if (x < 0)
- goto j;
- goto a;
-q:
- goto b;
-e:
- x <<= 1;
- goto b;
-}
-
-int printf(const char *, ...);
-int main() {
- printf("should print 14: %d\n", crz(7));
- printf("should print 0: %d\n", crz(-3));
- printf("should print 0: %d\n", crz(0));
-}