提交 99c200d4 编写于 作者: M mahaifeng

Revert "[array-buffer]修改条件编译"

This reverts commit 5d19c837.
上级 5d19c837
......@@ -23,8 +23,7 @@ const int16 = new TInt16Array()
export function testArrayBuffer() : Result {
return describe("ArrayBuffer", () => {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
//dataview start
test('dataview_constructor', () => {
tDataView.setConstructor()
......@@ -754,8 +753,7 @@ export function testArrayBuffer() : Result {
test('uint32_testSome', () => {
uint32.testSome()
})
//uint32 end
// #endif
//uint32 end
})
}
\ No newline at end of file
......@@ -18,7 +18,6 @@ export class TDataView {
// this.setUint8();
// this.testMix();
}
// #ifndef APP-IOS
setConstructor() {
let buffer = new ArrayBuffer(16);
let dataview = new DataView(buffer);
......@@ -343,5 +342,4 @@ class LittleEndian {
this.uint8View_[byteOffset + 3] * (1 << 24)
);
}
// #endif
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import {
export class TFloat32Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testfloat32();
this.testConstructor();
this.testSet();
......@@ -34,7 +34,7 @@ export class TFloat32Array {
this.arrayBufferSlice();
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
from() {
var float32Array = Float32Array.from([1, 2, 3], (v : number, _ : number) : number => v + v);
expect(float32Array.toString()).toEqual('2,4,6');
......
......@@ -7,7 +7,7 @@ import {
export class TFloat64Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testfloat64();
this.testConstructor();
this.testSet();
......@@ -34,7 +34,7 @@ export class TFloat64Array {
this.arrayBufferSlice();
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testfloat64() {
let float64 = new Float64Array(2);
float64[0] = 42;
......
......@@ -7,7 +7,7 @@ import {
export class TInt16Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testConstructor();
this.testSet();
this.testCopyWith();
......@@ -34,7 +34,7 @@ export class TInt16Array {
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testConstructor() {
let buffer = new ArrayBuffer(16);
let int16 = new Int16Array(buffer);
......
......@@ -7,7 +7,7 @@ import {
export class TInt32Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testInt32Array();
this.testConstructor();
this.testSet();
......@@ -35,7 +35,7 @@ export class TInt32Array {
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testInt32Array() {
let int32 = new Int32Array(2);
int32[0] = 42;
......
......@@ -8,7 +8,7 @@ import {
export class TInt8Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testConstructor();
this.testSet();
this.testCopyWith();
......@@ -35,7 +35,7 @@ export class TInt8Array {
//#endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testConstructor() {
let buffer = new ArrayBuffer(16);
let int8View = new Int8Array(buffer);
......
......@@ -7,7 +7,7 @@ import {
export class TUint8Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testMAX();
this.testConstructor();
this.testSet();
......@@ -34,7 +34,7 @@ export class TUint8Array {
this.arrayBufferSlice();
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
from() {
var s = new Set([1, 2, 3]);
var unit8 = Uint8Array.from(s);
......
......@@ -7,7 +7,7 @@ import {
export class TUint8ClampedArray {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testMAX();
this.testConstructor();
this.testSet();
......@@ -35,7 +35,7 @@ export class TUint8ClampedArray {
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testMAX() {
let uint8Clamped = new Uint8ClampedArray(16);
uint8Clamped[0] = 255;
......
......@@ -7,7 +7,7 @@ import {
export class TUint16Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testuint16();
this.testConstructor();
this.testSet();
......@@ -35,7 +35,7 @@ export class TUint16Array {
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testuint16() {
let uint16 = new Uint16Array(2);
uint16[0] = 42;
......
......@@ -7,7 +7,7 @@ import {
export class TUint32Array {
test() {
// #ifndef APP-IOS
// #ifdef APP-ANDROID
this.testuint32();
this.testConstructor();
this.testSet();
......@@ -35,7 +35,7 @@ export class TUint32Array {
// #endif
}
// #ifndef APP-IOS
// #ifdef APP-ANDROID
testuint32() {
let uint32 = new Uint32Array(2);
uint32[0] = 42;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册