update ut for validate

Signed-off-by: s00912778 <shijiakai2@huawei.com>
Change-Id: I3d11b59b31b9bdce994d6ec6e7eb05052b6018b9
This commit is contained in:
s00912778 2024-10-22 11:16:31 +08:00
parent c20cddb274
commit c30ba3fc8c
6 changed files with 18 additions and 18 deletions

View File

@ -191,10 +191,7 @@
"message": "Property 'message' cannot initialize using '$' to create a reference to a variable.",
"type": "ERROR"
},
"validateModuleName": {
"message": "The module name 'Button' can not be the same as the inner component name.",
"type": "ERROR"
},
"validateModuleName": [],
"notComponent": [],
"notConcurrent": {
"message": "The struct 'NotConcurrentIndexDecorator' use invalid decorator.",
@ -1002,9 +999,5 @@
"message": "The type of the @Consumer property can not be a class decorated with @Observed.",
"type": "ERROR"
}
],
"index": {
"message": "The struct 'Button' cannot have the same name as the built-in component 'Button'.",
"type": "ERROR"
}
]
}

View File

@ -1,9 +1,9 @@
@Component
export struct Button {
export struct Button1 {
@State message: string = 'Hello World';
build() {
Column() {
}
}
}
}

View File

@ -0,0 +1,9 @@
@Component
export struct Button1 {
@State message: string = 'Hello World';
build() {
Column() {
}
}
}

View File

@ -1,12 +1,11 @@
import { Button } from './index'
// @ts-nocheck
import { Button1 } from './index'
import { Button1 } from './index1'
@Entry
@Component
struct home {
@State message: string = 'Hello World';
build() {
Column() {
}
}
}

View File

@ -2,9 +2,9 @@
@ComponentV2
struct testParam {
@Param param_value: string;
@Require @Local param_value: string = "hello"
@Require @Local param_value1: string = "hello"
@Require value: string = "hello"
@Once @Local param_value1: string = "hello"
@Once @Local param_value2: string = "hello"
@Once value1: string = "hello"
build() {
Column() {}

View File

@ -202,7 +202,6 @@ export const UT_VALIDATE_PAGES: string[] = [
'Decorators/process_custom_component/validateNonLinkWithDollar',
'Decorators/process_custom_component/validateParamTwoWayBind',
'Decorators/process_import/index', // No such test case
'Decorators/process_import/validateModuleName',
'Decorators/process_struct_componentV2/param_require_once_check',