Some more test files. Signed-off-by: Erik de Bruin <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/3aa04633 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/3aa04633 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/3aa04633 Branch: refs/heads/develop Commit: 3aa046337f77cbaf06bc982d5de8488d2d420e76 Parents: 1baa594 Author: Erik de Bruin <[email protected]> Authored: Wed Jul 2 16:15:46 2014 +0200 Committer: Erik de Bruin <[email protected]> Committed: Fri Aug 1 12:59:16 2014 +0200 ---------------------------------------------------------------------- .../test-files/vf2js/files/SimpleAS.as | 4 ++ .../test-files/vf2js/files/SimpleAS_result.js | 43 ++++++++++++++++---- .../projects/simpleMXML/src/SimpleMXML.mxml | 19 +++++++++ .../simpleMXML/src/example/Component.as | 13 ++++++ 4 files changed, 70 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/3aa04633/compiler.jx.tests/test-files/vf2js/files/SimpleAS.as ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/test-files/vf2js/files/SimpleAS.as b/compiler.jx.tests/test-files/vf2js/files/SimpleAS.as index fd9baf3..c4bd427 100644 --- a/compiler.jx.tests/test-files/vf2js/files/SimpleAS.as +++ b/compiler.jx.tests/test-files/vf2js/files/SimpleAS.as @@ -21,6 +21,8 @@ package org.apache.flex import flash.events.IEventDispatcher; +import mx.components.Button; + import spark.components.Button; public dynamic class A extends spark.components.Button implements IEventDispatcher @@ -34,6 +36,8 @@ public dynamic class A extends spark.components.Button implements IEventDispatch private var _a:ArgumentError = new ArgumentError(); + private var _mxButton:mx.components.Button = new mx.components.Button(); + public const MY_INSTANCE_CONST:String = "myInstanceConst"; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/3aa04633/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js b/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js index e6ef05a..5bdb09a 100644 --- a/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js +++ b/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js @@ -11,22 +11,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/** + * org.apache.flex.A + * + * @fileoverview + * + * @suppress {checkTypes} + */ + goog.provide('org.apache.flex.A'); -goog.require('flash.events.IEventDispatcher'); -goog.require('spark.components.Button'); + /** * @constructor - * @extends {spark.components.Button} + * @extends {vf2js_s.components.Button} * @implements {flash.events.IEventDispatcher} */ org.apache.flex.A = function() { - var self = this; - goog.base(this); - self.trace(typeof("a")); -} -goog.inherits(org.apache.flex.A, spark.components.Button); + goog.base(this); + org.apache.flex.utils.Language.trace(typeof("a")); +}; +goog.inherits(org.apache.flex.A, vf2js_s.components.Button); + /** * @const @@ -34,14 +41,32 @@ goog.inherits(org.apache.flex.A, spark.components.Button); */ org.apache.flex.A.MY_CLASS_CONST = "myClassConst"; + /** * @private * @type {ArgumentError} */ org.apache.flex.A.prototype._a = new ArgumentError(); + +/** + * @private + * @type {vf2js_mx.components.Button} + */ +org.apache.flex.A.prototype._mxButton = new vf2js_mx.components.Button(); + + /** * @const * @type {string} */ -org.apache.flex.A.prototype.MY_INSTANCE_CONST = "myInstanceConst"; \ No newline at end of file +org.apache.flex.A.prototype.MY_INSTANCE_CONST = "myInstanceConst"; + + +/** + * Metadata + * + * @type {Object.<string, Array.<Object>>} + */ +org.apache.flex.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'org.apache.flex.A'}], interfaces: [flash.events.IEventDispatcher] }; + http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/3aa04633/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML.mxml ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML.mxml b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML.mxml new file mode 100644 index 0000000..389be97 --- /dev/null +++ b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML.mxml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:s="library://ns.adobe.com/flex/spark" + xmlns:mx="library://ns.adobe.com/flex/mx" + xmlns:example="example.*" + minHeight="600" + minWidth="955"> + + <fx:Script><![CDATA[ + + private var myComponent:Component = new Component(); + + ]]></fx:Script> + + <fx:Declarations> + <example:Component myProperty="oops" /> + </fx:Declarations> + +</s:Application> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/3aa04633/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component.as ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component.as b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component.as new file mode 100644 index 0000000..7754afb --- /dev/null +++ b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component.as @@ -0,0 +1,13 @@ +package example +{ + + public class Component + { + public function Component() + { + super(); + } + + public var myProperty:Object = {}; + } +} \ No newline at end of file
