about summary refs log tree commit diff
path: root/test/swftests
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-07-18 14:20:34 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-07-19 23:05:07 +0200
commit0cb2056304178ae8944e84c5bc72f96102291a12 (patch)
tree440fb20b2907a34f89cd9a4f4cbf04313b7d572b /test/swftests
parent5425626790a46f9b5bdecf4e33bb254c4c2423ea (diff)
downloadyoutube-dl-0cb2056304178ae8944e84c5bc72f96102291a12.tar.gz
youtube-dl-0cb2056304178ae8944e84c5bc72f96102291a12.tar.xz
youtube-dl-0cb2056304178ae8944e84c5bc72f96102291a12.zip
[swfinterp] Start working on basic tests
Diffstat (limited to 'test/swftests')
-rw-r--r--test/swftests/.gitignore1
-rw-r--r--test/swftests/LocalVars.as13
2 files changed, 14 insertions, 0 deletions
diff --git a/test/swftests/.gitignore b/test/swftests/.gitignore
new file mode 100644
index 000000000..da97ff7ca
--- /dev/null
+++ b/test/swftests/.gitignore
@@ -0,0 +1 @@
+*.swf
diff --git a/test/swftests/LocalVars.as b/test/swftests/LocalVars.as
new file mode 100644
index 000000000..b2911a9f3
--- /dev/null
+++ b/test/swftests/LocalVars.as
@@ -0,0 +1,13 @@
+// input: [1, 2]
+// output: 3
+
+package {
+public class LocalVars {
+    public static function main(a:int, b:int):int{
+        var c:int = a + b + b;
+        var d:int = c - b;
+        var e:int = d;
+        return e;
+    }
+}
+}