Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
68ecb051
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1595
Star
27
Fork
9
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
Hello UTS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
68ecb051
编写于
7月 09, 2024
作者:
lizhongyi_
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整部分示例避免iOS编译失败
上级
326c71dd
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
64 addition
and
29 deletion
+64
-29
uni_modules/uts-syntaxcase/utssdk/index.uts
uni_modules/uts-syntaxcase/utssdk/index.uts
+1
-23
uni_modules/uts-syntaxcase/utssdk/interface.uts
uni_modules/uts-syntaxcase/utssdk/interface.uts
+21
-1
uni_modules/uts-tests/utssdk/ArrayBuffer.uts
uni_modules/uts-tests/utssdk/ArrayBuffer.uts
+2
-1
uni_modules/uts-tests/utssdk/TDataView.uts
uni_modules/uts-tests/utssdk/TDataView.uts
+2
-0
uni_modules/uts-tests/utssdk/TFloat32Array.uts
uni_modules/uts-tests/utssdk/TFloat32Array.uts
+4
-0
uni_modules/uts-tests/utssdk/TFloat64Array.uts
uni_modules/uts-tests/utssdk/TFloat64Array.uts
+4
-1
uni_modules/uts-tests/utssdk/TInt16Array.uts
uni_modules/uts-tests/utssdk/TInt16Array.uts
+4
-1
uni_modules/uts-tests/utssdk/TInt32Array.uts
uni_modules/uts-tests/utssdk/TInt32Array.uts
+4
-0
uni_modules/uts-tests/utssdk/TInt8Array.uts
uni_modules/uts-tests/utssdk/TInt8Array.uts
+4
-1
uni_modules/uts-tests/utssdk/TUInt8Array.uts
uni_modules/uts-tests/utssdk/TUInt8Array.uts
+4
-0
uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts
uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts
+4
-0
uni_modules/uts-tests/utssdk/TUint16Array.uts
uni_modules/uts-tests/utssdk/TUint16Array.uts
+6
-1
uni_modules/uts-tests/utssdk/TUint32Array.uts
uni_modules/uts-tests/utssdk/TUint32Array.uts
+4
-0
未找到文件。
uni_modules/uts-syntaxcase/utssdk/index.uts
浏览文件 @
68ecb051
import
{
RequestTask
,
SyncOptions
}
from
"./interface.uts"
;
import
{
RequestTask
,
SyncOptions
,
AsyncOptions
,
SyntaxResult
,
SyncResult
,
TestOptions
}
from
"./interface.uts"
;
import
{
log
}
from
"./utils.uts"
;
export
type
AsyncOptions
=
{
type
:
string
;
success
:
(
res
:
string
)
=>
void
;
fail
:
(
res
:
string
)
=>
void
;
complete
:
(
res
:
string
)
=>
void
;
};
export
type
{
SyncOptions
}
from
"./interface.uts"
;
type
SyntaxResult
=
{
name
:
string
};
type
SyncResult
=
{
msg
:
string
}
/**
* 导出一个属性
...
...
@@ -115,11 +98,6 @@ export async function testAsyncParam3(id : number, name : string, opts : AsyncOp
}
export
type
TestOptions
=
{
name
:
string
;
callback
:
(
res
:
string
)
=>
void
;
};
export
class
Test
{
id
:
number
;
name
:
string
;
...
...
uni_modules/uts-syntaxcase/utssdk/interface.uts
浏览文件 @
68ecb051
...
...
@@ -9,3 +9,23 @@ export interface RequestTask {
onCallback(callback : (res : string) => void) : void
sync(options : SyncOptions) : string
}
export type AsyncOptions = {
type : string;
success : (res : string) => void;
fail : (res : string) => void;
complete : (res : string) => void;
};
export type SyntaxResult = {
name : string
};
export type SyncResult = {
msg : string
}
export type TestOptions = {
name : string;
callback : (res : string) => void;
};
\ No newline at end of file
uni_modules/uts-tests/utssdk/ArrayBuffer.uts
浏览文件 @
68ecb051
...
...
@@ -23,6 +23,7 @@ const int16 = new TInt16Array()
export function testArrayBuffer() : Result {
return describe("ArrayBuffer", () => {
// #ifdef APP-ANDROID
//dataview start
test('dataview_constructor', () => {
tDataView.setConstructor()
...
...
@@ -725,7 +726,7 @@ export function testArrayBuffer() : Result {
test('uint32_arrayBufferSlice', () => {
uint32.arrayBufferSlice()
})
// #endif
//uint32 end
})
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TDataView.uts
浏览文件 @
68ecb051
...
...
@@ -18,6 +18,7 @@ export class TDataView {
// this.setUint8();
// this.testMix();
}
// #ifdef APP-ANDROID
setConstructor() {
let buffer = new ArrayBuffer(16);
let dataview = new DataView(buffer);
...
...
@@ -327,4 +328,5 @@ class LittleEndian {
this.uint8View_[byteOffset + 3] * (1 << 24)
);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TFloat32Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TFloat32Array {
test() {
// #ifdef APP-ANDROID
this.testfloat32();
this.testConstructor();
this.testSet();
...
...
@@ -31,7 +32,9 @@ export class TFloat32Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
from(){
var float32Array= Float32Array.from([1, 2, 3], (v: number, _: number):number => v + v);
expect(float32Array.toString()).toEqual('2,4,6');
...
...
@@ -285,4 +288,5 @@ export class TFloat32Array {
let sliced = new Float32Array(res);
expect(sliced[1]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TFloat64Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TFloat64Array {
test() {
// #ifdef APP-ANDROID
this.testfloat64();
this.testConstructor();
this.testSet();
...
...
@@ -31,8 +32,9 @@ export class TFloat64Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
testfloat64() {
let float32 = new Float64Array(2);
float32[0] = 42;
...
...
@@ -276,4 +278,5 @@ export class TFloat64Array {
let sliced = new Float64Array(res);
expect(sliced[0]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TInt16Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TInt16Array {
test() {
// #ifdef APP-ANDROID
this.testConstructor();
this.testSet();
this.testCopyWith();
...
...
@@ -30,9 +31,10 @@ export class TInt16Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
testConstructor() {
let buffer = new ArrayBuffer(16);
let float32 = new Int16Array(buffer);
...
...
@@ -250,4 +252,5 @@ export class TInt16Array {
let sliced = new Int16Array(res);
expect(sliced[0]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TInt32Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TInt32Array {
test() {
// #ifdef APP-ANDROID
this.testfloat32();
this.testConstructor();
this.testSet();
...
...
@@ -31,8 +32,10 @@ export class TInt32Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
testfloat32() {
let float32 = new Int32Array(2);
float32[0] = 42;
...
...
@@ -266,4 +269,5 @@ export class TInt32Array {
let sliced = new Int32Array(res);
expect(sliced[1]).toEqual(42);
}
// #endif
}
uni_modules/uts-tests/utssdk/TInt8Array.uts
浏览文件 @
68ecb051
...
...
@@ -8,6 +8,7 @@ import {
export class TInt8Array {
test() {
// #ifdef APP-ANDROID
this.testConstructor();
this.testSet();
this.testCopyWith();
...
...
@@ -31,9 +32,10 @@ export class TInt8Array {
this.subarray();
this.values();
this.arrayBufferSlice();
//#endif
}
// #ifdef APP-ANDROID
testConstructor() {
let buffer = new ArrayBuffer(16);
let int8View = new Int8Array(buffer);
...
...
@@ -261,4 +263,5 @@ export class TInt8Array {
let sliced = new Int8Array(res);
expect(sliced[0]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TUInt8Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TUint8Array {
test() {
// #ifdef APP-ANDROID
this.testMAX();
this.testConstructor();
this.testSet();
...
...
@@ -31,7 +32,9 @@ export class TUint8Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
from() {
var s = new Set([1, 2, 3]);
var unit8 = Uint8Array.from(s);
...
...
@@ -264,4 +267,5 @@ export class TUint8Array {
let sliced = new Uint8Array(res);
expect(sliced[0]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TUInt8ClampedArray.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TUint8ClampedArray {
test() {
// #ifdef APP-ANDROID
this.testMAX();
this.testConstructor();
this.testSet();
...
...
@@ -31,8 +32,10 @@ export class TUint8ClampedArray {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
testMAX() {
let float32 = new Uint8ClampedArray(16);
float32[0] = 255;
...
...
@@ -259,4 +262,5 @@ export class TUint8ClampedArray {
let sliced = new Uint8ClampedArray(res);
expect(sliced[0]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TUint16Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TUint16Array {
test() {
// #ifdef APP-ANDROID
this.testfloat32();
this.testConstructor();
this.testSet();
...
...
@@ -31,8 +32,10 @@ export class TUint16Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
testfloat32() {
let float32 = new Uint16Array(2);
float32[0] = 42;
...
...
@@ -273,4 +276,6 @@ export class TUint16Array {
let sliced = new Uint16Array(res);
expect(sliced[0]).toEqual(42);
}
// #endif
}
\ No newline at end of file
uni_modules/uts-tests/utssdk/TUint32Array.uts
浏览文件 @
68ecb051
...
...
@@ -7,6 +7,7 @@ import {
export class TUint32Array {
test() {
// #ifdef APP-ANDROID
this.testfloat32();
this.testConstructor();
this.testSet();
...
...
@@ -31,8 +32,10 @@ export class TUint32Array {
this.subarray();
this.values();
this.arrayBufferSlice();
// #endif
}
// #ifdef APP-ANDROID
testfloat32() {
let float32 = new Uint32Array(2);
float32[0] = 42;
...
...
@@ -273,4 +276,5 @@ export class TUint32Array {
let sliced = new Uint32Array(res);
expect(sliced[1]).toEqual(42);
}
// #endif
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录