Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestToolChainDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
dsq
TestToolChainDemo
Commits
2b8291b3
Commit
2b8291b3
authored
Apr 10, 2026
by
qq_38816927
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义
parent
7609524c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
Index.ets
harmonyApp/entry/src/main/ets/pages/Index.ets
+19
-5
MyFunction.ets
harmonyApp/entry/src/main/ets/pages/MyFunction.ets
+18
-0
No files found.
harmonyApp/entry/src/main/ets/pages/Index.ets
View file @
2b8291b3
...
...
@@ -2,6 +2,8 @@ import { ArkUIViewController, Compose } from 'compose';
import { hilog } from '@kit.PerformanceAnalysisKit';
import nativeApi from 'libentry.so';
import { testArkTsToArkTs } from './TestJumpClass';
import { MyFunction } from './MyFunction';
//import测试区域
const DOMAIN = 0x0000;
...
...
@@ -23,15 +25,16 @@ struct Index {
return;
}
let unusedInt:number = 0;//未使用的变量
//ArkTs到Kotlin的单向跳转
nativeApi.testArkTsToKotin();
//原生内部跳转
testArkTsToArkTs();
try {
this.controller = nativeApi.MainArkUIViewController();
const state = this.controller ? 'created' : 'not_created';
...
...
@@ -96,7 +99,7 @@ function testPerformance(){
function testFormat(){
//测试后请复原
//输入"let a: number = 0;" 保留:和number的间距
//
选中上列代码(将光标移至代码最左侧,长按向右覆盖整段代码,同复制时的选中复制内容的操作),输入快捷键
//
输入快捷键(对全文件生效),无需选中代码
//Mac :Cmd + Option + L (默认)
//Windows:Ctrl + Alt + L (默认)
//观察是否复位 代码自动格式化为"let a:number = 0;"
...
...
@@ -106,14 +109,25 @@ function testFormat(){
//测试代码修复
function testRepair(){
//输入 "hilop.
debug(DOMAIN, 'Compose
', 'testRepair');"
//输入 "hilop.
info(0x0000, 'testTag
', 'testRepair');"
//鼠标悬停在 "hilop"上,等待修复窗口出现,观察窗口上是否有修改为"hilog"相关的字样,点击修复选项(包含“change”相关字段)。
//修正为
hilog.debug(DOMAIN, 'Compose', 'testRepair');
//修正为
“hilog.info(0x0000, 'testTag', 'testRepair');”
//代码修复测试点
}
//测试代码修复-自定义
function testMyRepair(){
// MyFunction.level2.level3.execute("1");-正确
// MyFunction.level2.level1.execute("1");-错误
//自定义代码修复测试点
}
//测试Find Usages
export function testFindUsages(){
//测试引用
...
...
harmonyApp/entry/src/main/ets/pages/MyFunction.ets
0 → 100644
View file @
2b8291b3
class Level3 {
public static execute(text: string): void {
console.log(text)
}
}
class Level2 {
public static level3 = Level3
}
class Level1 {
public static level2 = Level2
}
export const MyFunction = Level1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment