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 2014/11/21 13:10:37 UTC

[17/17] git commit: [flex-falcon] [refs/heads/develop] - Changed tests to reflect new 'superClass_' calls

Changed tests to reflect new 'superClass_' calls

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/75b555ae
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/75b555ae
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/75b555ae

Branch: refs/heads/develop
Commit: 75b555aeb1cb2547a57d40b7ad597dd20f733c20
Parents: d27432a
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 21 13:08:45 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 21 13:08:45 2014 +0100

----------------------------------------------------------------------
 .../vf2js/projects/interfaces/Test_result.js    |  2 +-
 .../test-files/vf2js/projects/super/Base.as     | 65 +++++++++++---------
 .../vf2js/projects/super/Base_result.js         | 11 ++++
 .../test-files/vf2js/projects/super/Super.as    | 51 ++++++++-------
 .../vf2js/projects/super/Super_result.js        |  9 +++
 5 files changed, 87 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/75b555ae/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js b/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
index f6c5b6d..2d3c7a5 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
@@ -51,7 +51,7 @@ Test.prototype.doSomething = function(ic) {
   for (var /** @type {number} */ i = 0; i < 3; i++) {
     var /** @type {classes.A} */ a = null;
   }
-  Test.base(this, 'doStuff');
+  this.superClass_.doStuff.call(this);
   return ic;
 };
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/75b555ae/compiler.jx.tests/test-files/vf2js/projects/super/Base.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/super/Base.as b/compiler.jx.tests/test-files/vf2js/projects/super/Base.as
index 3cc5462..ee69d65 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/super/Base.as
+++ b/compiler.jx.tests/test-files/vf2js/projects/super/Base.as
@@ -18,39 +18,48 @@
 ////////////////////////////////////////////////////////////////////////////////
 package
 {
-	import Super;
 
-	public class Base extends Super
+import Super;
+
+public class Base extends Super
+{
+	public static var myClassConst:String = new Number();
+	
+	public function Base() 
 	{
-		public static var myClassConst:String = new Number();
-		
-		public function Base() 
-		{
-			super();
-		}; 
+		super();
+	}; 
 
-		private var number:Number = this.getNumber(); 
-		
-		private var newText:String = this.text; 
-		
-		private var newTextAgain:String = text; 
-		
-		override public function get text():String 
-		{
-			return "A" + super.text;
-		};
+	private var number:Number = this.getNumber(); 
 	
-		override public function set text(value:String):void 
-		{
-			if (value != super.text)
-			{
-				super.text = "B" + value;
-			}
-		};
-		
-		public function getNumber():void
+	private var newText:String = this.text; 
+	
+	private var newTextAgain:String = text; 
+	
+	override public function get text():String 
+	{
+		return "A" + super.text;
+	};
+
+	override public function set text(value:String):void 
+	{
+		if (value != super.text)
 		{
-			var x:Number = super.x;
+			super.text = "B" + value;
 		}
+	};
+	
+	public function getNumber():void
+	{
+		alert(super.doStuff());
+		
+		var x:Number = super.x;
 	}
+	
+	override public function doStuff():Number 
+	{
+		throw new Error("No way!");
+	};
+
+}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/75b555ae/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js b/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
index b5063c6..db6e56d 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
@@ -97,11 +97,22 @@ Base.prototype.set_text = function(value) {
  * @expose
  */
 Base.prototype.getNumber = function() {
+  alert(this.superClass_.doStuff.call(this));
   var /** @type {number} */ x = this.get_x();
 };
 
 
 /**
+ * @expose
+ * @return {number}
+ * @override
+ */
+Base.prototype.doStuff = function() {
+  throw new Error("No way!");
+};
+
+
+/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/75b555ae/compiler.jx.tests/test-files/vf2js/projects/super/Super.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/super/Super.as b/compiler.jx.tests/test-files/vf2js/projects/super/Super.as
index 772c886..3a2bca2 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/super/Super.as
+++ b/compiler.jx.tests/test-files/vf2js/projects/super/Super.as
@@ -18,30 +18,37 @@
 ////////////////////////////////////////////////////////////////////////////////
 package
 {
-	public class Super
+
+public class Super
+{
+	public function Super() {}; 
+
+	private var _text:String = '';
+
+	public function get text():String 
 	{
-		public function Super() {}; 
+		return _text;
+	};
 
-		private var _text:String = '';
-	
-		public function get text():String 
+	public function set text(value:String):void 
+	{
+		if (value != _text)
 		{
-			return _text;
-		};
+			_text = value;
+		}
+	};
 	
-		public function set text(value:String):void 
-		{
-			if (value != _text)
-			{
-				_text = value;
-			}
-		};
-		
-		private var _x:Number = 5;
-		
-		public function get x():Number 
-		{
-			return _x;
-		};
-	}
+	private var _x:Number = 5;
+	
+	public function get x():Number 
+	{
+		return _x;
+	};
+	
+	public function doStuff():Number 
+	{
+		return "Stuff is done";
+	};
+	
+}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/75b555ae/compiler.jx.tests/test-files/vf2js/projects/super/Super_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/super/Super_result.js b/compiler.jx.tests/test-files/vf2js/projects/super/Super_result.js
index f4fdb42..0ad1a30 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/super/Super_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/super/Super_result.js
@@ -73,6 +73,15 @@ Super.prototype.get_x = function() {
 
 
 /**
+ * @expose
+ * @return {number}
+ */
+Super.prototype.doStuff = function() {
+  return "Stuff is done";
+};
+
+
+/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}