Browse Source

fix test (see #3940)

Simon Krajewski 10 years ago
parent
commit
cfae85f49e

+ 2 - 2
std/haxe/io/Bytes.hx

@@ -328,8 +328,8 @@ class Bytes {
 		Store the 64 bit integer at given position (in low endian encoding).
 	**/
 	public inline function setInt64( pos : Int, v : haxe.Int64 ) : Void {
-		setInt32(pos, haxe.Int64.getLow(v));
-		setInt32(pos + 4, haxe.Int64.getHigh(v));
+		setInt32(pos, v.low);
+		setInt32(pos + 4, v.high);
 	}
 
 	public function getString( pos : Int, len : Int ) : String {

+ 4 - 4
std/haxe/io/BytesBuffer.hx

@@ -124,7 +124,7 @@ class BytesBuffer {
 		add(Bytes.ofString(v));
 		#end
 	}
-	
+
 	public #if flash9 inline #end function addInt32( v : Int ) {
 		#if flash9
 		b.writeUnsignedInt(v);
@@ -135,10 +135,10 @@ class BytesBuffer {
 		addByte(v>>>24);
 		#end
 	}
-	
+
 	public #if flash9 inline #end function addInt64( v : haxe.Int64 ) {
-		addInt32(haxe.Int64.getLow(v));
-		addInt32(haxe.Int64.getHigh(v));
+		addInt32(v.low);
+		addInt32(v.high);
 	}
 
 	public inline function addFloat( v : Float ) {

+ 2 - 2
tests/unit/src/unitstd/haxe/io/BytesBuffer.unit.hx

@@ -17,7 +17,7 @@ var str = "ABCDEF\x01\x02\x03\x04\x05BCD";
 b.length == str.length;
 for( i in 0...str.length )
 	b.get(i) == str.charCodeAt(i);
-	
+
 
 var out = new haxe.io.BytesBuffer();
 out.addInt32(0xABCDEF00);
@@ -34,7 +34,7 @@ b.getInt32(0) == 0xABCDEF00;
 b.get(4) == 42;
 b.getFloat(5) == 1.2999999523162842;
 b.getDouble(9) == 2.4;
-b.getInt64(17) == haxe.Int64.make(0xABCDEF00,0xCAFFEED1);
+t(b.getInt64(17) == haxe.Int64.make(0xABCDEF00,0xCAFFEED1));
 
 // check correct low endian encoding
 b.get(3) == 0xAB;