aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/test/in/while.c
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-18 14:50:45 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-18 14:50:45 +0000
commit1e68e77f3119c2558aceb2837eb1e25111eedab9 (patch)
tree047a2eeaa92b626279e7f1cb5eb24788c0db0b3c /c_compiler/test/in/while.c
parent835458c3b1f055c2d2548c002120f73bb46877cc (diff)
downloadCompiler-1e68e77f3119c2558aceb2837eb1e25111eedab9.tar.gz
Compiler-1e68e77f3119c2558aceb2837eb1e25111eedab9.zip
Made test cases a bit better
Diffstat (limited to 'c_compiler/test/in/while.c')
-rw-r--r--c_compiler/test/in/while.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/c_compiler/test/in/while.c b/c_compiler/test/in/while.c
index 00ad19d..caa38b2 100644
--- a/c_compiler/test/in/while.c
+++ b/c_compiler/test/in/while.c
@@ -1,11 +1,15 @@
int main()
{
int x = 0;
+ int y;
+ y = 0;
while(x < 10)
{
+ y = y + 1;
+
x = x + 1;
}
- return x;
+ return y;
}