Added initial test + result 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/65150e4b Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/65150e4b Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/65150e4b Branch: refs/heads/develop Commit: 65150e4bef10cf7ce3c0c0d39d6edad63d1e6789 Parents: 9444a32 Author: Erik de Bruin <[email protected]> Authored: Mon Jun 30 13:22:01 2014 +0200 Committer: Erik de Bruin <[email protected]> Committed: Fri Aug 1 12:59:14 2014 +0200 ---------------------------------------------------------------------- .../test-files/vf2js/files/Simple.mxml | 4 + .../test-files/vf2js/files/Simple_result.js | 93 ++++++++++++++++++++ 2 files changed, 97 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/65150e4b/compiler.jx.tests/test-files/vf2js/files/Simple.mxml ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/test-files/vf2js/files/Simple.mxml b/compiler.jx.tests/test-files/vf2js/files/Simple.mxml new file mode 100644 index 0000000..b628a00 --- /dev/null +++ b/compiler.jx.tests/test-files/vf2js/files/Simple.mxml @@ -0,0 +1,4 @@ +<vf2js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" + xmlns:vf2js="http://flex.apache.org/vf2js/ns" + <vf2js:Button label="hello" /> +</vf2js:Application> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/65150e4b/compiler.jx.tests/test-files/vf2js/files/Simple_result.js ---------------------------------------------------------------------- diff --git a/compiler.jx.tests/test-files/vf2js/files/Simple_result.js b/compiler.jx.tests/test-files/vf2js/files/Simple_result.js new file mode 100644 index 0000000..3c23e6e --- /dev/null +++ b/compiler.jx.tests/test-files/vf2js/files/Simple_result.js @@ -0,0 +1,93 @@ +/** + * Licensed 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. + */ +/** + * Simple + * + * @fileoverview + * + * @suppress {checkTypes} + */ + +goog.provide('Simple'); + +goog.require('vf2js.components.Application'); +goog.require('vf2js.components.Button'); + + + + +/** + * @constructor + * @extends {vf2js.components.Application} + */ +Simple = function() { + goog.base(this); + + /** + * @private + * @type {vf2js.components.Button} + */ + this.$ID0; + + /** + * @private + * @type {Array} + */ + this.mxmldd; + + /** + * @private + * @type {Array} + */ + this.mxmldp; +}; +goog.inherits(Simple, vf2js.components.Application); + + +/** + * Metadata + * + * @type {Object.<string, Array.<Object>>} + */ +Simple.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Simple', qName: 'Simple' }] }; + + +/** + * @override + * @return {Array} the Array of UI element descriptors. + */ +Simple.prototype.get_MXMLProperties = function() +{ + if (this.mxmldp == undefined) + { + /** @type {Array} */ + var arr = goog.base(this, 'get_MXMLProperties'); + /** @type {Array} */ + var data = [ +1, +'mxmlContentFactory', +false, +[vf2js.components.Button, 2, '_id', true, '$ID0', 'label', true, 'hello', 0, 0, null], +0, +0 +]; + + if (arr) + this.mxmldp = arr.concat(data); + else + this.mxmldp = data; + } + return this.mxmldp; +}; +
