update ut for validate

Signed-off-by: s00912778 <shijiakai2@huawei.com>
Change-Id: I22b5e813b0a9ad73bd0e31669fe9da1c6120faf6
This commit is contained in:
s00912778 2024-10-22 11:36:18 +08:00
parent f563288ff7
commit bc4ceb2c94
7 changed files with 16 additions and 19 deletions

View File

@ -74,7 +74,7 @@
"type": "ERROR"
},
"validateBuildMethodCount": {
"message": "struct 'Index' must be at least or at most one 'build' method.Solutions:>A structurally modified page must have at least one and no more than one'build' method.",
"message": "struct 'ValidateBuildMethodCountIndex' must be at least or at most one 'build' method.Solutions:>A structurally modified page must have at least one and no more than one'build' method.",
"type": "ERROR"
},
"validateHasController": {

View File

@ -1,12 +1,11 @@
// @ts-nocheck
@Entry
@Component
struct Index {
@Styles styleComp(color) {
struct StylesParamChackIndex {
@Styles styleComp(color: string) {
.backgroundColor(color)
}
build() {
Text('Hello')
.styleComp('red')
.styleComp('red')
}
}

View File

@ -1,8 +1,7 @@
// @ts-nocheck
@Entry
@Component
struct Index {
build(a) {
struct ProcessComponentMethodIndex {
build(a:string) {
Row(){}
}
}
}

View File

@ -1,14 +1,13 @@
class TestCase {
private name: string;
constructor(name) {
constructor(name: string) {
this.name = name;
}
}
// @ts-nocheck
}
@Entry
@Component
struct Index extends TestCase{
struct UpdateHeritageClausesIndex extends TestCase{
build() {
Row(){}
}
}
}

View File

@ -1,4 +1,4 @@
@Entry
@Component
struct Index {
struct ValidateBuildMethodCountIndex {
}

View File

@ -1,8 +1,8 @@
@Entry
@Component
struct Index {
@State static message: string = 'Hello';
struct ValidateDecoratorsIndex {
@State static message: string = 'Hello';
build() {
Row() {}
}
}
}