aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2012-05-08 14:29:01 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2012-05-08 14:29:01 +0200
commit6ac720f095c7e89d11d1136b271f7493e080f988 (patch)
treeb90bc962d14bccc0bf55eeb64ba9ce12a9bb5b07 /tests
parentf71ce49202d2fb3008664e59bf5b73af5ab2c609 (diff)
Optimized version of simple.js
Diffstat (limited to 'tests')
-rw-r--r--tests/simple2.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/simple2.js b/tests/simple2.js
new file mode 100644
index 0000000000..484d1fe68c
--- /dev/null
+++ b/tests/simple2.js
@@ -0,0 +1,19 @@
+
+function main()
+{
+ var a = 1
+ var b = 2
+ var c = 10
+ var d = 100
+
+ for (i = 0; i < 1000000; i = i + 1) {
+ if (a == 1)
+ d = d + a + b * c
+ else
+ d = 321
+ }
+
+ print("the result is", d)
+}
+
+main()