flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshtynj...@apache.org
Subject [1/6] git commit: [flex-falcon] [refs/heads/develop] - compiler-jx: improved tests for typedefs
Date Fri, 16 Dec 2016 23:26:19 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop e2fe54782 -> 1ad5ed4ab


compiler-jx: improved tests for typedefs


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/1ad5ed4a
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/1ad5ed4a
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/1ad5ed4a

Branch: refs/heads/develop
Commit: 1ad5ed4aba60abbe9885e481f4f0341a7114db36
Parents: 24c44fb
Author: Josh Tynjala <joshtynjala@gmail.com>
Authored: Fri Dec 16 15:24:47 2016 -0800
Committer: Josh Tynjala <joshtynjala@gmail.com>
Committed: Fri Dec 16 15:25:39 2016 -0800

----------------------------------------------------------------------
 .../codegen/externals/ExternalsTestBase.java    |  5 +-
 .../codegen/externals/ExternalsTestUtils.java   | 52 +++++++++++++-------
 .../codegen/externals/TestExternChrome.java     | 12 ++---
 .../externals/TestExternalsJSCompile.java       |  3 ++
 4 files changed, 47 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/1ad5ed4a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestBase.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestBase.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestBase.java
index eafd375..fa33002 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestBase.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestBase.java
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.codegen.externals;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;
@@ -27,6 +28,7 @@ import java.util.HashSet;
 
 import org.apache.flex.compiler.clients.EXTERNC;
 import org.apache.flex.compiler.clients.ExternCConfiguration;
+import org.apache.flex.compiler.clients.problems.ProblemQuery;
 import org.apache.flex.compiler.internal.codegen.externals.reference.MethodReference;
 import org.apache.flex.compiler.internal.codegen.externals.reference.ReferenceModel;
 import org.apache.flex.compiler.problems.ICompilerProblem;
@@ -53,9 +55,10 @@ public abstract class ExternalsTestBase
     {
         config = new ExternCConfiguration();
         configure(config);
+        assertFalse(config.getConfigurationProblems().size() > 0);
         client = new EXTERNC(config);
         model = client.getModel();
-        model.problems = new HashSet<ICompilerProblem>();
+        model.problems = new ProblemQuery();
     }
 
     protected abstract void configure(ExternCConfiguration config) throws IOException;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/1ad5ed4a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
index 34286c9..608aabe 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/ExternalsTestUtils.java
@@ -142,6 +142,7 @@ public class ExternalsTestUtils
         config.addExternal(coreRoot + "/es3.js");
         config.addExternal(coreRoot + "/es5.js");
         config.addExternal(coreRoot + "/es6.js");
+        config.addExternal(coreRoot + "/es6_collections.js");
 
         config.addExternal(coreRoot + "/browser/w3c_anim_timing.js");
         config.addExternal(coreRoot + "/browser/w3c_audio.js");
@@ -152,43 +153,58 @@ public class ExternalsTestUtils
         config.addExternal(coreRoot + "/browser/w3c_dom1.js");
         config.addExternal(coreRoot + "/browser/w3c_dom2.js");
         config.addExternal(coreRoot + "/browser/w3c_dom3.js");
+        //config.addExternal(coreRoot + "/browser/w3c_dom4.js");
         config.addExternal(coreRoot + "/browser/w3c_elementtraversal.js");
-        config.addExternal(coreRoot + "/browser/w3c_encoding.js");
         config.addExternal(coreRoot + "/browser/w3c_event.js");
         config.addExternal(coreRoot + "/browser/w3c_event3.js");
+        config.addExternal(coreRoot + "/browser/w3c_gamepad.js");
         config.addExternal(coreRoot + "/browser/w3c_geolocation.js");
         config.addExternal(coreRoot + "/browser/w3c_indexeddb.js");
+        config.addExternal(coreRoot + "/browser/w3c_midi.js");
         config.addExternal(coreRoot + "/browser/w3c_navigation_timing.js");
+        config.addExternal(coreRoot + "/browser/w3c_permissions.js");
+        config.addExternal(coreRoot + "/browser/w3c_pointer_events.js");
         config.addExternal(coreRoot + "/browser/w3c_range.js");
+        config.addExternal(coreRoot + "/browser/w3c_requestidlecallback.js");
         config.addExternal(coreRoot + "/browser/w3c_rtc.js");
+        config.addExternal(coreRoot + "/browser/w3c_screen_orientation.js");
         config.addExternal(coreRoot + "/browser/w3c_selectors.js");
+        //config.addExternal(coreRoot + "/browser/w3c_serviceworker.js");
         config.addExternal(coreRoot + "/browser/w3c_touch_event.js");
-        //model.addExternal(coreRoot + "/w3c_serviceworker.js");
-        //model.addExternal(coreRoot + "/w3c_webcrypto.js");
+        //config.addExternal(coreRoot + "/browser/w3c_webcrypto.js");
         config.addExternal(coreRoot + "/browser/w3c_xml.js");
 
-        //model.addExternal(coreRoot + "/fetchapi");
+        config.addExternal(coreRoot + "/browser/whatwg_encoding.js");
 
-        config.addExternal(coreRoot + "/browser/window.js");
-
-        config.addExternal(coreRoot + "/browser/ie_dom.js");
+        config.addExternal(coreRoot + "/browser/chrome.js");
+        //config.addExternal(coreRoot + "/browser/fetchapi.js");
+        config.addExternal(coreRoot + "/browser/fileapi.js");
+        config.addExternal(coreRoot + "/browser/flash.js");
+        config.addExternal(coreRoot + "/browser/gecko_css.js");
         config.addExternal(coreRoot + "/browser/gecko_dom.js");
+        config.addExternal(coreRoot + "/browser/gecko_event.js");
+        config.addExternal(coreRoot + "/browser/gecko_xml.js");
+        config.addExternal(coreRoot + "/browser/html5.js");
+        config.addExternal(coreRoot + "/browser/ie_css.js");
+        config.addExternal(coreRoot + "/browser/ie_dom.js");
+        config.addExternal(coreRoot + "/browser/ie_event.js");
+        config.addExternal(coreRoot + "/browser/ie_vml.js");
+        config.addExternal(coreRoot + "/browser/intl.js");
+        config.addExternal(coreRoot + "/browser/iphone.js");
+        config.addExternal(coreRoot + "/browser/mediasource.js");
+        config.addExternal(coreRoot + "/browser/page_visibility.js");
+        config.addExternal(coreRoot + "/browser/streamsapi.js");
+        config.addExternal(coreRoot + "/browser/url.js");
+        config.addExternal(coreRoot + "/browser/v8.js");
+        config.addExternal(coreRoot + "/browser/webgl.js");
 
         config.addExternal(coreRoot + "/browser/webkit_css.js");
         config.addExternal(coreRoot + "/browser/webkit_dom.js");
         config.addExternal(coreRoot + "/browser/webkit_event.js");
-        //model.addExternal(coreRoot + "/webkit_notifications.js");
-
-        config.addExternal(coreRoot + "/browser/iphone.js");
-        config.addExternal(coreRoot + "/browser/chrome.js");
-        config.addExternal(coreRoot + "/browser/flash.js");
-
-        config.addExternal(coreRoot + "/browser/page_visibility.js");
-        config.addExternal(coreRoot + "/browser/fileapi.js");
-        config.addExternal(coreRoot + "/browser/html5.js");
-
-        config.addExternal(coreRoot + "/browser/webgl.js");
+        //config.addExternal(coreRoot + "/browser/webkit_notifications.js");
+        config.addExternal(coreRoot + "/browser/webkit_usercontent.js");
         config.addExternal(coreRoot + "/browser/webstorage.js");
+        config.addExternal(coreRoot + "/browser/window.js");
 
         config.addExternal(coreRoot + "/svg.js");
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/1ad5ed4a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternChrome.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternChrome.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternChrome.java
index 6056569..d2582bb 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternChrome.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternChrome.java
@@ -40,12 +40,12 @@ public class TestExternChrome extends ExternalsTestBase
         client.cleanOutput();
         Result result = compile();
         assertTrue(result.success);
-        if (model.problems.size() > 0)
+        if (model.problems.getProblems().size() > 0)
         {
-        	for (ICompilerProblem problem : model.problems)
+        	for (ICompilerProblem problem : model.problems.getProblems())
         		System.out.println(problem.toString() + " " + problem.getSourcePath() + " " + problem.getLine());
       	
         }
-        assertEquals(0, model.problems.size());
+        assertEquals(0, model.problems.getProblems().size());
 
         String[] classes = {
                 "chrome",
@@ -82,12 +82,12 @@ public class TestExternChrome extends ExternalsTestBase
         client.cleanOutput();
         Result result = compile();
         assertTrue(result.success);
-        if (model.problems.size() > 0)
+        if (model.problems.getProblems().size() > 0)
         {
-        	for (ICompilerProblem problem : model.problems)
+        	for (ICompilerProblem problem : model.problems.getProblems())
         		System.out.println(problem.toString() + " " + problem.getSourcePath() + " " + problem.getLine());
       	
         }
-        assertEquals(0, model.problems.size());
+        assertEquals(0, model.problems.getProblems().size());
 
         // Port
         ClassReference Port = model.getClassReference("Port");

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/1ad5ed4a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
index fdb4887..8aec761 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/externals/TestExternalsJSCompile.java
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.codegen.externals;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.io.BufferedOutputStream;
@@ -91,6 +92,8 @@ public class TestExternalsJSCompile
         config.setASRoot(ExternalsTestUtils.AS_ROOT_DIR);
         ExternalsTestUtils.addTestExcludesFull(config);
         ExternalsTestUtils.addTestExternalsFull(config);
+        
+        assertFalse(config.getConfigurationProblems().size() > 0);
 
         client = new EXTERNC(config);
 


Mime
View raw message