[hackers] [scc] Add basic test for for loops || Roberto E. Vargas Caballero

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

commit 5c3dd68b9c8862b5eee0f9b9f08928c702e7c607
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Aug 15 20:40:40 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sat Aug 15 20:40:40 2015 +0200

    Add basic test for for loops

diff --git a/cc1/tests/test009.c b/cc1/tests/test009.c
new file mode 100644
index 0000000..9fb3421
--- /dev/null
+++ b/cc1/tests/test009.c
_AT_@ -0,0 +1,37 @@
+/*
+name: TEST009
+description: Basic test for loops
+output:
+F1
+G1 F1 main
+{
+-
+A2 I x
+ A2 #I0 :I
+ j L5
+ d
+L3
+ A2 A2 #I1 +I :I
+L5
+ j L3 A2 #IA <I
+ b
+L4
+ j L6 A2 #IA =I
+ yI #I1
+L6
+ yI #I0
+}
+*/
+
+int
+main()
+{
+ int x;
+
+ for (x = 0; x < 10 ; x = x + 1)
+ ;
+ if (x != 10)
+ return 1;
+ return 0;
+}
+
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:25 CEST