You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/11/01 12:33:21 UTC
[08/10] git commit: [flex-falcon] [refs/heads/develop] - Added
project (multiple classes) support to FlexJS tests.
Added project (multiple classes) support to FlexJS tests.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/7bebfd4b
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/7bebfd4b
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/7bebfd4b
Branch: refs/heads/develop
Commit: 7bebfd4b741cf30222e2f7b80fc7d205051d9586
Parents: d68c565
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 1 09:49:41 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 1 12:32:58 2013 +0100
----------------------------------------------------------------------
.../codegen/js/flexjs/TestFlexJSProject.java | 85 ++++++++++++++++++++
1 file changed, 85 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7bebfd4b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
new file mode 100644
index 0000000..7191660
--- /dev/null
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSProject.java
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.js.flexjs;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.flex.compiler.driver.IBackend;
+import org.apache.flex.compiler.internal.codegen.js.goog.TestGoogProject;
+import org.apache.flex.compiler.internal.driver.js.flexjs.FlexJSBackend;
+import org.apache.flex.compiler.internal.projects.FlexJSProject;
+import org.apache.flex.utils.FilenameNormalization;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * This class tests the production of valid 'flexjs' JS code from an external
+ * project.
+ *
+ * @author Erik de Bruin
+ */
+public class TestFlexJSProject extends TestGoogProject
+{
+
+ private static String projectDirPath = "flexjs/projects";
+
+ @Override
+ public void setUp()
+ {
+ project = new FlexJSProject(workspace);
+ super.setUp();
+ }
+
+ @Ignore
+ @Test
+ public void test_imports()
+ {
+ // crude bypass to allow for successful inheritance
+ }
+
+ @Test
+ public void test_Test()
+ {
+ String testDirPath = projectDirPath + "/interfaces";
+
+ String fileName = "Test";
+
+ List<String> compiledFileNames = compileProject(fileName, testDirPath);
+
+ assertProjectOut(compiledFileNames, testDirPath);
+ }
+
+ @Override
+ protected void addSourcePaths(List<File> sourcePaths)
+ {
+ sourcePaths.add(new File(FilenameNormalization.normalize("test-files"
+ + File.separator + projectDirPath + "/interfaces")));
+
+ super.addSourcePaths(sourcePaths);
+ }
+
+ @Override
+ protected IBackend createBackend()
+ {
+ return new FlexJSBackend();
+ }
+
+}