Browse Source

[As3] fixed ffloor/fceil/fround unit tests

Simon Krajewski 12 years ago
parent
commit
8fe2546c90
2 changed files with 2 additions and 5 deletions
  1. 1 1
      std/Math.hx
  2. 1 4
      tests/unit/TestBasetypes.hx

+ 1 - 1
std/Math.hx

@@ -49,7 +49,7 @@ extern class Math
 	static function pow(v:Float,exp:Float):Float;
 	static function random() : Float;
 	
-	#if (flash9 || cpp)
+	#if ((flash9 && !as3) || cpp)
 	
 	static function ffloor( v : Float ) : Float;
 	static function fceil( v : Float ) : Float;

+ 1 - 4
tests/unit/TestBasetypes.hx

@@ -157,7 +157,7 @@ class TestBasetypes extends Test {
 
 		eq( Std.int( -10000000000.7), 0xABF41C00 );
 
-		#if (js || flash8)
+		#if (js || flash8 || as3)
 
 		// higher Int resolution : should we fix this or not ?
 		eq( Math.floor( -10000000000.7)*1.0, -10000000001. );
@@ -172,12 +172,9 @@ class TestBasetypes extends Test {
 
 		#end
 
-		#if !as3
 		eq( Math.ffloor( -10000000000.7), -10000000001. );
 		eq( Math.fceil( -10000000000.7), -10000000000. );
 		eq( Math.fround( -10000000000.7), -10000000001. );
-		#end
-
 	}
 
 	function testHash() {