aboutsummaryrefslogtreecommitdiff
path: root/test/swftests
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-11-17 04:25:04 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-11-17 04:25:10 +0100
commit3cbcff8a2dacf6d4f10f00af36b9761ef833e6ea (patch)
tree0bbf17a25e321d1d0502d94ae31995a8a7456a31 /test/swftests
parente983cf52775e493b7deedbe48d2f50f598c9da4e (diff)
[swfinterp] Implement String basics
Diffstat (limited to 'test/swftests')
-rw-r--r--test/swftests/StringBasics.as11
-rw-r--r--test/swftests/StringConversion.as11
2 files changed, 22 insertions, 0 deletions
diff --git a/test/swftests/StringBasics.as b/test/swftests/StringBasics.as
new file mode 100644
index 000000000..d27430b13
--- /dev/null
+++ b/test/swftests/StringBasics.as
@@ -0,0 +1,11 @@
+// input: []
+// output: 3
+
+package {
+public class StringBasics {
+ public static function main():int{
+ var s:String = "abc";
+ return s.length;
+ }
+}
+}
diff --git a/test/swftests/StringConversion.as b/test/swftests/StringConversion.as
new file mode 100644
index 000000000..c976f5042
--- /dev/null
+++ b/test/swftests/StringConversion.as
@@ -0,0 +1,11 @@
+// input: []
+// output: 2
+
+package {
+public class StringConversion {
+ public static function main():int{
+ var s:String = String(99);
+ return s.length;
+ }
+}
+}