diff --git a/uni_modules/uts-tests/utssdk/ArrayBuffer.uts b/uni_modules/uts-tests/utssdk/ArrayBuffer.uts index 2df130391d8f99b65f65bcedad23ceaa4c6c17fc..fef4993791035e1f03467f71e2688ed333e97c2b 100644 --- a/uni_modules/uts-tests/utssdk/ArrayBuffer.uts +++ b/uni_modules/uts-tests/utssdk/ArrayBuffer.uts @@ -23,7 +23,8 @@ const int16 = new TInt16Array() export function testArrayBuffer() : Result { return describe("ArrayBuffer", () => { - // #ifdef APP-ANDROID + // #ifndef APP-IOS + //dataview start test('dataview_constructor', () => { tDataView.setConstructor() @@ -753,7 +754,8 @@ export function testArrayBuffer() : Result { test('uint32_testSome', () => { uint32.testSome() }) - // #endif + //uint32 end + // #endif }) } \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/TDataView.uts b/uni_modules/uts-tests/utssdk/TDataView.uts index 4b4ab7857903e537f12bd123abf71fc3e6769aa1..a109f40f74f5765a0a9a5a8ed4b7b88a00f49075 100644 --- a/uni_modules/uts-tests/utssdk/TDataView.uts +++ b/uni_modules/uts-tests/utssdk/TDataView.uts @@ -18,6 +18,7 @@ export class TDataView { // this.setUint8(); // this.testMix(); } + // #ifndef APP-IOS setConstructor() { let buffer = new ArrayBuffer(16); let dataview = new DataView(buffer); @@ -40,7 +41,7 @@ export class TDataView { view.setInt8(1, 127); // Max signed 8-bit integer expect(view.getInt8(1)).toEqual(127); // #END - } + } setFloat32() { // #TEST DataView.setFloat32,DataView.getFloat32 @@ -50,7 +51,7 @@ export class TDataView { view.setFloat32(1, 3); expect(this.numberEquals(3, view.getFloat32(1))).toEqual(true); // #END - } + } setFloat64() { // #TEST DataView.setFloat64,DataView.getFloat64 @@ -60,7 +61,7 @@ export class TDataView { view.setFloat64(1, Math.PI); expect(this.numberEquals(3.141592653589793, view.getFloat64(1))).toEqual(true); // #END - } + } setInt16() { // #TEST DataView.setInt16,DataView.getInt16 @@ -70,7 +71,7 @@ export class TDataView { view.setInt16(1, 32767); // Max signed 16-bit integer expect(view.getInt16(1)).toEqual(32767); // #END - } + } setInt32() { // #TEST DataView.setInt32,DataView.getInt32 @@ -80,7 +81,7 @@ export class TDataView { view.setInt32(1, 2147483647); // Max signed 32-bit integer expect(this.numberEquals(2147483647, view.getInt32(1))).toEqual(true); // #END - } + } setUint16() { // #TEST DataView.setUint16,DataView.getUint16 @@ -100,7 +101,7 @@ export class TDataView { view.setUint32(1, 4294967295); // Max unsigned 32-bit integer expect(this.numberEquals(4294967295, view.getUint32(1))).toEqual(true); // #END - } + } setUint8() { // #TEST DataView.setUint8,DataView.getUint8 @@ -342,4 +343,5 @@ class LittleEndian { this.uint8View_[byteOffset + 3] * (1 << 24) ); } + // #endif } \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/TFloat32Array.uts b/uni_modules/uts-tests/utssdk/TFloat32Array.uts index 89549b7d728a68257bdb61f07cfa66ccef35bf22..1795e124f19df99641fc0a918815fc6f391ca9fd 100644 --- a/uni_modules/uts-tests/utssdk/TFloat32Array.uts +++ b/uni_modules/uts-tests/utssdk/TFloat32Array.uts @@ -7,7 +7,7 @@ import { export class TFloat32Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testfloat32(); this.testConstructor(); this.testSet(); @@ -34,7 +34,7 @@ export class TFloat32Array { this.arrayBufferSlice(); // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS from() { var float32Array = Float32Array.from([1, 2, 3], (v : number, _ : number) : number => v + v); expect(float32Array.toString()).toEqual('2,4,6'); diff --git a/uni_modules/uts-tests/utssdk/TFloat64Array.uts b/uni_modules/uts-tests/utssdk/TFloat64Array.uts index bc347d63230e6ff512439300dd262e36a09bc3ac..5e54ac2712068437390dcfbc704470cc03908494 100644 --- a/uni_modules/uts-tests/utssdk/TFloat64Array.uts +++ b/uni_modules/uts-tests/utssdk/TFloat64Array.uts @@ -7,7 +7,7 @@ import { export class TFloat64Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testfloat64(); this.testConstructor(); this.testSet(); @@ -34,7 +34,7 @@ export class TFloat64Array { this.arrayBufferSlice(); // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testfloat64() { let float64 = new Float64Array(2); float64[0] = 42; diff --git a/uni_modules/uts-tests/utssdk/TInt16Array.uts b/uni_modules/uts-tests/utssdk/TInt16Array.uts index 469abf1cde7b2d12248433a49928dac7fefa1061..830d2174c1d686368e1a17a1dcd131566ff89547 100644 --- a/uni_modules/uts-tests/utssdk/TInt16Array.uts +++ b/uni_modules/uts-tests/utssdk/TInt16Array.uts @@ -7,7 +7,7 @@ import { export class TInt16Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testConstructor(); this.testSet(); this.testCopyWith(); @@ -34,7 +34,7 @@ export class TInt16Array { // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testConstructor() { let buffer = new ArrayBuffer(16); let int16 = new Int16Array(buffer); diff --git a/uni_modules/uts-tests/utssdk/TInt32Array.uts b/uni_modules/uts-tests/utssdk/TInt32Array.uts index 0b73a373db85906e8e439f374eca8856336fe275..23f71ad4ca7faf7668569f940ed35ff64b32099d 100644 --- a/uni_modules/uts-tests/utssdk/TInt32Array.uts +++ b/uni_modules/uts-tests/utssdk/TInt32Array.uts @@ -7,7 +7,7 @@ import { export class TInt32Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testInt32Array(); this.testConstructor(); this.testSet(); @@ -35,7 +35,7 @@ export class TInt32Array { // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testInt32Array() { let int32 = new Int32Array(2); int32[0] = 42; diff --git a/uni_modules/uts-tests/utssdk/TInt8Array.uts b/uni_modules/uts-tests/utssdk/TInt8Array.uts index ba4fde41a6d46a4b32140613573ba3564e5415de..0efd20c2262d329dc512da4a6a9edac79a4ac6be 100644 --- a/uni_modules/uts-tests/utssdk/TInt8Array.uts +++ b/uni_modules/uts-tests/utssdk/TInt8Array.uts @@ -8,7 +8,7 @@ import { export class TInt8Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testConstructor(); this.testSet(); this.testCopyWith(); @@ -35,7 +35,7 @@ export class TInt8Array { //#endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testConstructor() { let buffer = new ArrayBuffer(16); let int8View = new Int8Array(buffer); @@ -294,7 +294,7 @@ export class TInt8Array { } arrayBufferSlice() { - + // #TEST ArrayBuffer.slice let buffer = new ArrayBuffer(16); let int8 = new Int8Array(buffer); @@ -305,7 +305,7 @@ export class TInt8Array { let sliced = new Int8Array(res); expect(sliced[0]).toEqual(42); // #END - + } testSome() { diff --git a/uni_modules/uts-tests/utssdk/TUInt8Array.uts b/uni_modules/uts-tests/utssdk/TUInt8Array.uts index cbacbc4c7c5da17e44ba79c2d01c58aa733ec201..f93f855986e2349443edb92cee5908b69b15d91d 100644 --- a/uni_modules/uts-tests/utssdk/TUInt8Array.uts +++ b/uni_modules/uts-tests/utssdk/TUInt8Array.uts @@ -7,7 +7,7 @@ import { export class TUint8Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testMAX(); this.testConstructor(); this.testSet(); @@ -34,7 +34,7 @@ export class TUint8Array { this.arrayBufferSlice(); // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS from() { var s = new Set([1, 2, 3]); var unit8 = Uint8Array.from(s); diff --git a/uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts b/uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts index 583c1e821fe3c31fd356e7052c34cba701a4bd15..4dfdaeeeb28b3b4cf52cfdcb8a1941e421870aab 100644 --- a/uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts +++ b/uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts @@ -7,7 +7,7 @@ import { export class TUint8ClampedArray { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testMAX(); this.testConstructor(); this.testSet(); @@ -35,7 +35,7 @@ export class TUint8ClampedArray { // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testMAX() { let uint8Clamped = new Uint8ClampedArray(16); uint8Clamped[0] = 255; diff --git a/uni_modules/uts-tests/utssdk/TUint16Array.uts b/uni_modules/uts-tests/utssdk/TUint16Array.uts index a322a0b3c02c07ab49bb2b556c3a6d2f504be6ac..73f87a5539a3cf523d7a3afbf235295f2c5dbe0a 100644 --- a/uni_modules/uts-tests/utssdk/TUint16Array.uts +++ b/uni_modules/uts-tests/utssdk/TUint16Array.uts @@ -7,7 +7,7 @@ import { export class TUint16Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testuint16(); this.testConstructor(); this.testSet(); @@ -35,7 +35,7 @@ export class TUint16Array { // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testuint16() { let uint16 = new Uint16Array(2); uint16[0] = 42; diff --git a/uni_modules/uts-tests/utssdk/TUint32Array.uts b/uni_modules/uts-tests/utssdk/TUint32Array.uts index b6c822e6834d354ca2f29310a6c15d5ff5f2cfd0..096e95a70e9caec57bd475115efea30f10640abd 100644 --- a/uni_modules/uts-tests/utssdk/TUint32Array.uts +++ b/uni_modules/uts-tests/utssdk/TUint32Array.uts @@ -7,7 +7,7 @@ import { export class TUint32Array { test() { - // #ifdef APP-ANDROID + // #ifndef APP-IOS this.testuint32(); this.testConstructor(); this.testSet(); @@ -35,7 +35,7 @@ export class TUint32Array { // #endif } - // #ifdef APP-ANDROID + // #ifndef APP-IOS testuint32() { let uint32 = new Uint32Array(2); uint32[0] = 42;