You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/10/14 21:42:47 UTC
[royale-asjs] 06/06: test for Flex resources
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 602a73e53c74c0c048f315a83752575aec50578d
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 14 14:42:23 2018 -0700
test for Flex resources
---
manualtests/ResourceManagerTest/build.xml | 44 +++++++++++++++++++
.../src/ResourceManagerTest.mxml | 49 ++++++++++++++++++++++
2 files changed, 93 insertions(+)
diff --git a/manualtests/ResourceManagerTest/build.xml b/manualtests/ResourceManagerTest/build.xml
new file mode 100644
index 0000000..7f57311
--- /dev/null
+++ b/manualtests/ResourceManagerTest/build.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<project name="ResourceManagerTest" default="main" basedir=".">
+ <property name="ROYALE_HOME" location="../.."/>
+ <property name="example" value="ResourceManagerTest" />
+
+ <property file="${ROYALE_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${ROYALE_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${ROYALE_HOME}"/>
+
+
+ <include file="${basedir}/../build_example.xml" />
+
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+ </target>
+
+ <target name="clean">
+ <delete dir="${basedir}/bin" failonerror="false" />
+ <delete dir="${basedir}/bin-debug" failonerror="false" />
+ <delete dir="${basedir}/bin-release" failonerror="false" />
+ <delete dir="${basedir}/target" failonerror="false" />
+ </target>
+
+</project>
diff --git a/manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml b/manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml
new file mode 100644
index 0000000..65e964b
--- /dev/null
+++ b/manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/royale/basic"
+ xmlns:mx="library://ns.apache.org/royale/mx"
+ xmlns:local="*">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayList;
+
+ private function test():void
+ {
+ var al:ArrayList = new ArrayList();
+ try
+ {
+ al.getItemAt(100);
+ }
+ catch (e:Error)
+ {
+ output.text = e.message;
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <mx:Label text="ResourceManager Test"/>
+
+ <mx:Button label="Test" click="test()"/>
+
+ <mx:Label id="output" text="output goes here"/>
+</mx:Application>