royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-compiler] 01/03: no errors in tests for externc
Date Fri, 17 Nov 2017 18:47:07 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/rename
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 5cbf58d8f27347c3dbc3082e60e7c3573c18d1f1
Author: Alex Harui <aharui@apache.org>
AuthorDate: Fri Nov 17 09:37:43 2017 -0800

    no errors in tests for externc
---
 compiler-externc/src/test/build.xml                | 154 +++++++++++++
 .../codegen/typedefs}/CompilerArguments.java       |   2 +-
 .../codegen/typedefs}/ExternalsTestBase.java       |   4 +-
 .../codegen/typedefs}/ExternalsTestUtils.java      |  33 +--
 .../codegen/typedefs}/TestAnnotationEnum.java      |   2 +-
 .../codegen/typedefs}/TestCollectImports.java      |   2 +-
 .../codegen/typedefs}/TestConstructor.java         |   2 +-
 .../codegen/typedefs}/TestExternChrome.java        |   2 +-
 .../internal/codegen/typedefs}/TestExternES3.java  |   2 +-
 .../codegen/typedefs}/TestExternJQuery.java        |   2 +-
 .../codegen/typedefs}/TestExternJSMissing.java     |   2 +-
 .../codegen/typedefs}/TestExternJasmine.java       |   2 +-
 .../internal/codegen/typedefs}/TestExternNode.java |   2 +-
 .../codegen/typedefs}/TestPackageNamespace.java    |   2 +-
 .../codegen/typedefs}/TestReferenceModel.java      |   2 +-
 .../codegen/typedefs}/TestTypeExternals.java       |   2 +-
 .../codegen/typedefs}/TestTypeInheritence.java     |   2 +-
 .../typedefs/unit_tests}/annotation_enum.js        |   0
 .../typedefs/unit_tests}/constructor_members.js    |   0
 .../typedefs/unit_tests}/constructor_params.js     |   0
 .../imports/import_constructor_signatures.js       |   0
 .../unit_tests}/imports/import_functions.js        |   0
 .../unit_tests}/imports/import_interfaces.js       |   0
 .../imports/import_method_signatures.js            |   0
 .../unit_tests}/imports/import_superclasses.js     |   0
 .../test/resources/typedefs/unit_tests/missing.js  | 242 +++++++++++++++++++++
 .../typedefs/unit_tests}/package_namespace.js      |   0
 .../typedefs/unit_tests}/type_inheritence.js       |   0
 .../resources/typedefs/unit_tests}/types_param.js  |   0
 .../codegen/externals/TestExternalsJSCompile.java  |   8 +-
 30 files changed, 427 insertions(+), 42 deletions(-)

diff --git a/compiler-externc/src/test/build.xml b/compiler-externc/src/test/build.xml
new file mode 100644
index 0000000..d01262e
--- /dev/null
+++ b/compiler-externc/src/test/build.xml
@@ -0,0 +1,154 @@
+<?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="compiler.externc.tests" default="main" basedir=".">
+
+    <pathconvert property="externc.tests" dirsep="/">
+        <path location="${basedir}"/>
+    </pathconvert>
+
+    <property environment="env"/>
+	<property file="unittest.properties" />
+	<property name="test.timeout" value="400000" />
+	<property name="maxmem" value="512" />
+	
+    <property name="compiler.externc" value="${externc.tests}/../.."/>
+    <property name="compiler.jx" value="${compiler.externc}/../compiler-jx"/>
+    <property name="compiler.jx.tests" value="${compiler.jx}/src/test"/>
+
+    <target name="download" description="Downloads third-party JARs">
+        <ant antfile="${compiler.jx.tests}/downloads.xml" dir="${compiler.jx.tests}"/>
+        <mkdir dir="${compiler.externc}/target/junit-temp/externs" />
+        <unjar src="${compiler.jx}/lib/google/closure-compiler/compiler.jar"
+            dest="${compiler.externc}/target/junit-temp/externs">
+            <patternset>
+                <include name="externs.zip"/>
+            </patternset>
+        </unjar>
+        <mkdir dir="${compiler.externc}/target/downloads" />
+        <unzip src="${compiler.externc}/target/junit-temp/externs/externs.zip" dest="${compiler.externc}/target/downloads"
/>
+    </target>
+
+    <target name="compile.unit.tests">
+    	<delete dir="${compiler.externc}/target/test-classes"/>
+        <mkdir dir="${compiler.externc}/target/test-classes"/>
+        <javac debug="${javac.debug}" deprecation="${javac.deprecation}"
+			   encoding="UTF-8"
+			   destdir="${compiler.externc}/target/test-classes" includeAntRuntime="true">
+        	<src path="${externc.tests}/java"/>
+            <compilerarg value="-Xlint:all,-path"/>
+            <classpath>
+                <pathelement location="${compiler.externc}/target/test-classes"/>
+                <pathelement location="${compiler.externc}/../compiler-test-utils/target/classes"/>
+                <fileset dir="${compiler.jx}/lib" includes="**/*.jar"/>
+            </classpath>
+        </javac>
+    </target>
+    
+    <target name="typedefs.unit.tests" depends="download, compile.unit.tests">
+        <mkdir dir="${externc.tests}/results"/>
+        <mkdir dir="${compiler.externc}/target/junit-temp"/>
+        <mkdir dir="${compiler.externc}/target/junit-results"/>
+        <junit dir="${externc.tests}"
+            fork="yes" forkMode="perBatch" maxmemory="${maxmem}m" timeout="${test.timeout}"
+            printsummary="true" showoutput="true"
+            haltonerror="true" haltonfailure="true"
+            failureproperty="tests.unit.failed">
+            <classpath>
+                <pathelement location="${compiler.externc}/target/classes"/>
+                <pathelement location="${compiler.externc}/target/test-classes"/>
+                <pathelement location="${compiler.externc}/../compiler-test-utils/target/classes"/>
+                <fileset dir="${compiler.jx}/lib" includes="**/*.jar"/>
+                <fileset dir="${compiler.externc}/../compiler/lib" includes="**/*.jar"/>
+            </classpath>
+            <batchtest todir="${compiler.externc}/target/junit-results">
+                <fileset dir="${compiler.externc}/target/test-classes">
+                    <!-- externs tests -->
+                    <include name="**/TestExternES3.class"/>
+                    <include name="**/TestExternChrome.class"/>
+                    <include name="**/TestExternJSMissing.class"/>
+                    <include name="**/TestAnnotationEnum.class"/>
+                    <include name="**/TestCollectImports.class"/>
+                    <include name="**/TestConstructor.class"/>
+                    <include name="**/TestPackageNamespace.class"/>
+                    <include name="**/TestReferenceModel.class"/>
+                    <include name="**/TestTypeExternals.class"/>
+                    <include name="**/TestTypeInheritance.class"/>
+                </fileset>
+            </batchtest>
+            <formatter type="xml"/>
+            <assertions>
+                <enable/>
+            </assertions>
+        </junit>
+    </target>
+    
+    <target name="typedefs.integration.tests" depends="download, compile.unit.tests">
+        <mkdir dir="${externc.tests}/results"/>
+        <mkdir dir="${compiler.externc}/target/junit-temp"/>
+        <mkdir dir="${compiler.externc}/target/junit-results"/>
+        <junit dir="${externc.tests}"
+            fork="yes" forkMode="perBatch" maxmemory="${maxmem}m" timeout="${test.timeout}"
+            printsummary="true" showoutput="true"
+            haltonerror="true" haltonfailure="true"
+            failureproperty="tests.unit.failed">
+            <classpath>
+                <pathelement location="${compiler.externc}/target/classes"/>
+                <pathelement location="${compiler.externc}/target/test-classes"/>
+                <pathelement location="${compiler.externc}/../compiler-test-utils/target/classes"/>
+                <fileset dir="${compiler.jx}/lib" includes="**/*.jar"/>
+                <fileset dir="${compiler.externc}/../compiler/lib" includes="**/*.jar"/>
+            </classpath>
+            <batchtest todir="${compiler.externc}/target/junit-results">
+                <fileset dir="${compiler.externc}/target/test-classes">
+                    <!-- externs tests -->
+                    <include name="**/TestExternJasmine.class"/>
+                    <include name="**/TestExternJQuery.class"/>
+                    <include name="**/TestExternNode.class"/>
+                    <include name="**/TestAnnotationEnum.class"/>
+                    <include name="**/TestCollectImports.class"/>
+                    <include name="**/TestConstructor.class"/>
+                    <include name="**/TestPackageNamespace.class"/>
+                    <include name="**/TestReferenceModel.class"/>
+                    <include name="**/TestTypeExternals.class"/>
+                    <include name="**/TestTypeInheritance.class"/>
+                </fileset>
+            </batchtest>
+            <formatter type="xml"/>
+            <assertions>
+                <enable/>
+            </assertions>
+        </junit>
+    </target>
+    
+    <target name="main" depends="typedefs.unit.tests"/>
+
+    <target name="clean">
+        <delete dir="${externc.tests}/bin"/>
+        <delete dir="${externc.tests}/classes"/>
+        <delete dir="${externc.tests}/results"/>
+    </target>
+
+    <target name="wipe" depends="clean">
+        <delete dir="${compiler.externc}/target"/>
+    </target>
+
+</project>
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/CompilerArguments.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/CompilerArguments.java
similarity index 99%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/CompilerArguments.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/CompilerArguments.java
index 5fd586e..372fb8b 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/CompilerArguments.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/CompilerArguments.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/ExternalsTestBase.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/ExternalsTestBase.java
similarity index 97%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/ExternalsTestBase.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/ExternalsTestBase.java
index fceeefe..f55d6a9 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/ExternalsTestBase.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/ExternalsTestBase.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -41,7 +41,7 @@ import com.google.javascript.rhino.jstype.JSType;
 public abstract class ExternalsTestBase
 {
     private static File unitTestBaseDir =
-            new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(), "externals_unit_tests");
+            new File(TestAdapterFactory.getTestAdapter().getUnitTestBaseDir(), "typedefs/unit_tests");
 
     // Only used for testing, all configuration must happen in configure()
     protected ExternCConfiguration config;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/ExternalsTestUtils.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/ExternalsTestUtils.java
similarity index 90%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/ExternalsTestUtils.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/ExternalsTestUtils.java
index 792b832..abc6351 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/ExternalsTestUtils.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/ExternalsTestUtils.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import java.io.File;
 import java.io.IOException;
@@ -30,15 +30,17 @@ public class ExternalsTestUtils
     public static File TEMP_DIR = new File(
             FilenameNormalization.normalize("../../target/junit-temp"));
 
-    // XXX missing.js is a temp location until we can figure out where it should placed in
the build
+    // This is a copy of the missing.js in royale-typedefs/js.  It doesn't have to
+    // stay in sync.  We just want to prove we can override a few things
     public static File MISSING_JS_FILE = FilenameNormalization.normalize(new File(
-            "../../../externs/js/src/main/javascript/missing.js"));
+            "resources/typedefs/unit_tests/missing.js"));
+
+    public static File EXTERNAL_JS_DIR = FilenameNormalization.normalize(new File(
+           "../../target/downloads"));
 
     // XXX AS3.as is a namespace needed to override toString in some classes
     public static File AS3_NAMESPACE_FILE;
-
-    public static File EXTERNAL_JS_DIR;
-
+    
     public static File EXTERNAL_JQUERY_DIR;
 
     public static File EXTERNAL_JASMINE_DIR;
@@ -47,17 +49,11 @@ public class ExternalsTestUtils
 
     public static File AS_ROOT_DIR = new File(TEMP_DIR, "externals/as");
 
+    // some additional places to look for royale-typedefs files for
+    // integration tests that rely on royale-typedefs.
     public static void init()
     {
-    	File f = new File(
-        "../../../royale-typedefs/js/src/main/javascript/missing.js");
-    	if (!f.exists())
-    		 f = new File(
-    	        "../../../../royale-typedefs/js/src/main/javascript/missing.js");
-        // XXX missing.js is a temp location until we can figure out where it should placed
in the build
-        MISSING_JS_FILE = FilenameNormalization.normalize(f);
-
-        f = new File(
+        File f = new File(
         "../../../royale-typedefs/js/src/main/royale/AS3.as");
         if (!f.exists())
         	f = new File(
@@ -66,13 +62,6 @@ public class ExternalsTestUtils
         AS3_NAMESPACE_FILE = FilenameNormalization.normalize(f);
 
         f = new File(
-        "../../../royale-typedefs/js/target/downloads");
-        if (!f.exists())
-        	f = new File(
-            "../../../../royale-typedefs/js/target/downloads");
-        EXTERNAL_JS_DIR = FilenameNormalization.normalize(f);
-
-        f = new File(
         "../../../royale-typedefs/jquery/target/downloads");
         if (!f.exists())
         	f = new File(
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestAnnotationEnum.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestAnnotationEnum.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestAnnotationEnum.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestAnnotationEnum.java
index d47f488..57a819c 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestAnnotationEnum.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestAnnotationEnum.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestCollectImports.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestCollectImports.java
similarity index 99%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestCollectImports.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestCollectImports.java
index a4bae8b..caa670d 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestCollectImports.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestCollectImports.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.*;
 
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestConstructor.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestConstructor.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java
index 083f590..875d689 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestConstructor.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternChrome.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternChrome.java
similarity index 99%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternChrome.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternChrome.java
index 4e607c0..0944124 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternChrome.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternChrome.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternES3.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternES3.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternES3.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternES3.java
index bebf292..ef1ab59 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternES3.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternES3.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJQuery.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJQuery.java
similarity index 97%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJQuery.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJQuery.java
index e787e44..59e27b0 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJQuery.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJQuery.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJSMissing.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJSMissing.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJSMissing.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJSMissing.java
index f4e9c3a..32bbc2c 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJSMissing.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJSMissing.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import java.io.IOException;
 
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJasmine.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJasmine.java
similarity index 97%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJasmine.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJasmine.java
index 3e3c911..a539a3d 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternJasmine.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternJasmine.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import com.google.javascript.jscomp.Result;
 import org.apache.royale.compiler.clients.ExternCConfiguration;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternNode.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternNode.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternNode.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternNode.java
index 754cc61..550ad94 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternNode.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestExternNode.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestPackageNamespace.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestPackageNamespace.java
similarity index 97%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestPackageNamespace.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestPackageNamespace.java
index 6da1913..0b2409a 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestPackageNamespace.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestPackageNamespace.java
@@ -16,7 +16,7 @@
  *  limitations under the License.
  *
  */
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestReferenceModel.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestReferenceModel.java
similarity index 97%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestReferenceModel.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestReferenceModel.java
index c9a86d9..6e6a32d 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestReferenceModel.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestReferenceModel.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestTypeExternals.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestTypeExternals.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestTypeExternals.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestTypeExternals.java
index e3ecc99..ce004c5 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestTypeExternals.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestTypeExternals.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestTypeInheritence.java
b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestTypeInheritence.java
similarity index 98%
rename from compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestTypeInheritence.java
rename to compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestTypeInheritence.java
index d467d1d..1457af7 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestTypeInheritence.java
+++ b/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestTypeInheritence.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/annotation_enum.js b/compiler-externc/src/test/resources/typedefs/unit_tests/annotation_enum.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/annotation_enum.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/annotation_enum.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/constructor_members.js b/compiler-externc/src/test/resources/typedefs/unit_tests/constructor_members.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/constructor_members.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/constructor_members.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/constructor_params.js b/compiler-externc/src/test/resources/typedefs/unit_tests/constructor_params.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/constructor_params.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/constructor_params.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/imports/import_constructor_signatures.js
b/compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_constructor_signatures.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/imports/import_constructor_signatures.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_constructor_signatures.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/imports/import_functions.js
b/compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_functions.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/imports/import_functions.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_functions.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/imports/import_interfaces.js
b/compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_interfaces.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/imports/import_interfaces.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_interfaces.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/imports/import_method_signatures.js
b/compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_method_signatures.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/imports/import_method_signatures.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_method_signatures.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/imports/import_superclasses.js
b/compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_superclasses.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/imports/import_superclasses.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/imports/import_superclasses.js
diff --git a/compiler-externc/src/test/resources/typedefs/unit_tests/missing.js b/compiler-externc/src/test/resources/typedefs/unit_tests/missing.js
new file mode 100644
index 0000000..77c7791
--- /dev/null
+++ b/compiler-externc/src/test/resources/typedefs/unit_tests/missing.js
@@ -0,0 +1,242 @@
+/*
+ *
+ *  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.
+ *
+ */
+
+
+// webkit_notifications
+/**
+ * @constructor
+ */
+function ExtendableEvent() {}
+
+// chrome.js
+/**
+ * @constructor
+ */
+function HTMLEmbedElement() {};
+
+/**
+ * @type {!Window}
+ * @const
+ */
+var window;
+
+/**
+ * @type {!HTMLDocument}
+ */
+Window.prototype.document;
+
+/**
+ * resolveLocalFileSystemURI has been deprecated; this is the replacement.
+ * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURL
+ * @param {string} url
+ * @param {function(!Entry)} successCallback
+ * @param {function(!FileError)=} errorCallback
+ */
+Window.prototype.resolveLocalFileSystemURL = function(url, successCallback,
+    errorCallback) {}
+
+
+/**
+* @constructor
+*/
+function dialogPolyfill() {};
+
+/**
+* @param {!Element} element to upgrade, if necessary
+*/
+dialogPolyfill.registerDialog = function(element) {};
+
+/**
+ * @constructor
+ */
+function Navigator() {}
+
+
+/**
+ * @constructor
+ */
+function Screen() {}
+
+/**
+ * @constructor
+ */
+function uint() {}
+
+/**
+ * @param {number=} opt_radix Optional radix.
+ * @return {string} The result.
+ */
+uint.prototype.toString = function(opt_radix) {}
+
+/**
+ * @constructor
+ */
+function int() {}
+
+/**
+ * @param {number=} opt_radix Optional radix.
+ * @return {string} The result.
+ */
+int.prototype.toString = function(opt_radix) {}
+
+
+/**
+ * @type {Object}
+ */
+Object.prototype;
+
+/**
+ * @type {Object}
+ */
+Object.prototype.prototype;
+
+/**
+ * @constructor
+ * @extends {Function}
+ */
+function Class() {}
+
+/**
+ * @constructor
+ */
+function JSON() {}
+
+/**
+ * @param {string} s The input.
+ * @param {function=} opt_reviver Optional reviver.
+ * @return {Object} The result.
+ */
+JSON.parse = function(s, opt_reviver) {}
+
+/**
+ * @param {Object} obj The input.
+ * @param {function=} opt_replacer Optional reviver.
+ * @param {string|number=} opt_space Optional space.
+ * @return {string} The result.
+ */
+JSON.stringify = function(obj, opt_replacer, opt_space) {}
+
+// gecko
+
+/**
+ * @constructor
+ */
+function History() {}
+
+/**
+ * @constructor
+ */
+function Location() {}
+
+/**
+ * @type {number}
+ */
+XMLHttpRequest.prototype.timeout;
+
+
+/**
+ * @export
+ * This gets mapped to org.apache.royale.utils.Language.trace() by the compiler
+ * @param {...} rest
+ */
+function trace(rest) {}
+
+/**
+ * @type {!Console}
+ * @const
+ */
+var console;
+
+
+/**
+ * @type {number}
+ * @const
+ */
+Array.CASEINSENSITIVE;
+
+/**
+ * @type {number}
+ * @const
+ */
+Array.DESCENDING;
+
+/**
+ * @type {number}
+ * @const
+ */
+Array.UNIQUESORT;
+
+/**
+ * @type {number}
+ * @const
+ */
+Array.RETURNINDEXEDARRAY;
+
+/**
+ * @type {number}
+ * @const
+ */
+Array.NUMERIC;
+
+
+/**
+ * @param {number} index The index.
+ * @param {Object} element The Object.
+ */
+Array.prototype.insertAt = function(index, element) {};
+
+/**
+ * @param {number} index The index.
+ */
+Array.prototype.removeAt = function(index) {};
+
+/**
+ * @param {Object} fieldName The field name or array of field names.
+ * @param {Object=} opt_options The bitmask of options.
+ * @return {Array} The sorted Array.
+ */
+Array.prototype.sortOn = function(fieldName, opt_options) {};
+
+
+/**
+ * @type {number}
+ * @const
+ */
+int.MAX_VALUE;
+
+
+/**
+ * @type {number}
+ * @const
+ */
+int.MIN_VALUE;
+
+
+/**
+ * @type {number}
+ * @const
+ */
+uint.MAX_VALUE;
+
+
+/**
+ * @type {number}
+ * @const
+ */
+uint.MIN_VALUE;
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/package_namespace.js b/compiler-externc/src/test/resources/typedefs/unit_tests/package_namespace.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/package_namespace.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/package_namespace.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/type_inheritence.js b/compiler-externc/src/test/resources/typedefs/unit_tests/type_inheritence.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/type_inheritence.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/type_inheritence.js
diff --git a/compiler-jx/src/test/resources/externals_unit_tests/types_param.js b/compiler-externc/src/test/resources/typedefs/unit_tests/types_param.js
similarity index 100%
rename from compiler-jx/src/test/resources/externals_unit_tests/types_param.js
rename to compiler-externc/src/test/resources/typedefs/unit_tests/types_param.js
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternalsJSCompile.java
b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternalsJSCompile.java
index 270f688..1d23763 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternalsJSCompile.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/externals/TestExternalsJSCompile.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.codegen.externals;
+package org.apache.royale.compiler.internal.codegen.typedefs;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -60,11 +60,11 @@ public class TestExternalsJSCompile
 
     private static File tempDir = new File(testAdapter.getTempDir());
 
-    private static File app1ASSrcDir = new File(testAdapter.getUnitTestBaseDir(), "externals/app1/as_src");
+    private static File app1ASSrcDir = new File(testAdapter.getUnitTestBaseDir(), "typedefs/app1/as_src");
 
-    private static File app1AJSSrcDir = new File(testAdapter.getTempDir(), "externals/app1/js_src");
+    private static File app1AJSSrcDir = new File(testAdapter.getTempDir(), "typedefs/app1/js_src");
 
-    private static File jsSWCFile = new File(testAdapter.getTempDir(), "externals/bin/JS.swc");
+    private static File jsSWCFile = new File(testAdapter.getTempDir(), "typedefs/bin/JS.swc");
 
     protected static Workspace workspace = new Workspace();
     protected RoyaleJSProject project;

-- 
To stop receiving notification emails like this one, please contact
"commits@royale.apache.org" <commits@royale.apache.org>.

Mime
View raw message