瀏覽代碼

added test for #4142

Nicolas Cannasse 10 年之前
父節點
當前提交
c829fa1bcb
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      tests/unit/src/unitstd/haxe/io/UInt8Array.unit.hx

+ 6 - 0
tests/unit/src/unitstd/haxe/io/UInt8Array.unit.hx

@@ -79,3 +79,9 @@ for( i in 0...3 )
 b3[0] = b3[0] + 1;
 if( !emulated ) b3[0] == b[2];
 
+var bytes = haxe.io.Bytes.alloc(50);
+var b4 = haxe.io.UInt8Array.fromBytes(bytes);
+b4.length == 50;
+b4.set(0,55);
+b4.get(0) == 55;
+if( !emulated ) bytes.get(0) == 55;