[hackers] [scc] Add basic test for do while statements || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sat, 15 Aug 2015 23:27:07 +0200 (CEST)

commit ec647d24eb10e22e3f54acc0e22c9a9b91a2b6f7
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Aug 15 20:09:02 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sat Aug 15 20:09:02 2015 +0200

    Add basic test for do while statements

diff --git a/cc1/tests/test008.c b/cc1/tests/test008.c
new file mode 100644
index 0000000..a69cbe7
--- /dev/null
+++ b/cc1/tests/test008.c
_AT_@ -0,0 +1,43 @@
+/*
+name: TEST008
+description: Basic do while loop
+output:
+F1
+G1 F1 main
+{
+-
+A2 I x
+ A2 #I0 :I
+ d
+L3
+ A2 A2 #I1 +I :I
+ j L3 A2 #IA <I
+ b
+L4
+ d
+L5
+ A2 A2 #I1 +I :I
+ j L5 A2 #I14 <I
+ b
+L6
+ yI A2 #I14 -I
+}
+*/
+
+int
+main()
+{
+ int x;
+
+ x = 0;
+ do
+ x = x + 1;
+ while(x < 10);
+
+ do {
+ x = x + 1;
+ } while(x < 20);
+
+ return x - 20;
+}
+
Received on Sat Aug 15 2015 - 23:27:07 CEST

This archive was generated by hypermail 2.3.0 : Sat Aug 15 2015 - 23:36:22 CEST