update ut for validate

Signed-off-by: s00912778 <shijiakai2@huawei.com>
Change-Id: I2d762340dc8a6ed0ae4c89eca753ba0e6416937a
This commit is contained in:
s00912778 2024-10-22 11:01:58 +08:00
parent e2cec99dca
commit b997feb6a6
16 changed files with 21 additions and 23 deletions

View File

@ -195,10 +195,7 @@
"message": "The module name 'Button' can not be the same as the inner component name.", "message": "The module name 'Button' can not be the same as the inner component name.",
"type": "ERROR" "type": "ERROR"
}, },
"notComponent": { "notComponent": [],
"message": "Decorator '@Component', '@ComponentV2', or '@CustomDialog' is missing for struct 'EntryComponent'.",
"type": "ERROR"
},
"notConcurrent": { "notConcurrent": {
"message": "The struct 'NotConcurrentIndexDecorator' use invalid decorator.", "message": "The struct 'NotConcurrentIndexDecorator' use invalid decorator.",
"type": "WARN" "type": "WARN"

View File

@ -19,7 +19,7 @@ struct TestV1Parent {
@StorageProp("b") storage_prop_string_value: string = "hello" @StorageProp("b") storage_prop_string_value: string = "hello"
@LocalStorageLink("c") func_value1: Function = () => {} @LocalStorageLink("c") func_value1: Function = () => {}
@LocalStorageProp("d") func_value2: () => void = () => {} @LocalStorageProp("d") func_value2: () => void = () => {}
build() { build() {
Column() { Column() {
TestV2Child({ TestV2Child({

View File

@ -80,7 +80,7 @@ struct TestV1Parent {
@StorageProp("b") storage_prop_value: A = new A("hello") @StorageProp("b") storage_prop_value: A = new A("hello")
@LocalStorageLink("c") local_storage_link_value: A = new A("hello") @LocalStorageLink("c") local_storage_link_value: A = new A("hello")
@LocalStorageProp("c") local_storage_prop_value: A = new A("hello") @LocalStorageProp("c") local_storage_prop_value: A = new A("hello")
build() { build() {
Column() { Column() {
TestV2Child({ TestV2Child({
@ -114,6 +114,6 @@ struct TestV2Child {
@Event local_storage_prop_value: A = new A("hello") @Event local_storage_prop_value: A = new A("hello")
build() { build() {
} }
} }

View File

@ -9,7 +9,7 @@ struct MonitorHomeComponent {
class Test1 { class Test1 {
@Monitor("aa") onChange() { @Monitor("aa") onChange() {
} }
} }
declare const Custom: () => MethodDecorator declare const Custom: () => MethodDecorator

View File

@ -5,4 +5,4 @@ struct MethodNoExtendSummerpockets {
build(){ build(){
} }
} }

View File

@ -8,4 +8,4 @@ class nekopara {
struct NoStructDecoSummerpockets { struct NoStructDecoSummerpockets {
build(){ build(){
} }
} }

View File

@ -1,5 +1,5 @@
@Component @Component
struct OneEntrySummerpockets { struct OneEntrySummerpockets {
build(){ build(){
} }
} }

View File

@ -2,7 +2,7 @@ class OnlyStructDecoBsd {
@Builder @Builder
OnlyStructDecoBsd() { OnlyStructDecoBsd() {
} }
} }
@Entry @Entry
@ -10,4 +10,4 @@ class OnlyStructDecoBsd {
struct OnlyStructDecoSummerpockets { struct OnlyStructDecoSummerpockets {
build(){ build(){
} }
} }

View File

@ -1,3 +1,4 @@
@Entry
struct EntryComponent{ struct EntryComponent{
build(){ build(){
Column(){ Column(){

View File

@ -7,4 +7,4 @@ struct NotConcurrentIndexDecorator{
} }
.margin(10) .margin(10)
} }
} }

View File

@ -13,4 +13,4 @@ struct notConcurrentFun{
} }
function conFun() { function conFun() {
throw new Error('Function not implemented.') throw new Error('Function not implemented.')
} }

View File

@ -8,4 +8,4 @@ struct IndexDecorator{
} }
.margin(10) .margin(10)
} }
} }

View File

@ -13,7 +13,7 @@ struct v1DecoratorInComponentV2 {
@LocalStorageLink("b") localStorageLink_value: string = "hello" @LocalStorageLink("b") localStorageLink_value: string = "hello"
@LocalStorageProp("b") localStorageProp_value: string = "hello" @LocalStorageProp("b") localStorageProp_value: string = "hello"
@ObjectLink objectLink_value: AA @ObjectLink objectLink_value: AA
aa() {} aa() {}
build() { build() {

View File

@ -14,4 +14,4 @@ struct v2MemberDecorator {
build() { build() {
Column() Column()
} }
} }

View File

@ -1,4 +1,4 @@
declare const CustomMethod: PropertyDecorator; // declare const CustomMethod: PropertyDecorator;
@Entry @Entry
@Component @Component
@ -65,4 +65,4 @@ struct TestComponent1 {
get fullName() { get fullName() {
return "hello" return "hello"
} }
} }