• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/*
17   This test case is used to verify nested use of components.
18 */
19import {V1C,V1R,V2C,V2R} from  './exportComponents'
20@Entry
21@Component
22struct V11 {
23  build() {
24    Column() {
25      V1R()
26      V1C()
27      V2C()
28      V2R()
29      V11()
30      V22()
31      V11R()
32      V22R()
33    }
34  }
35}
36
37@ComponentV2
38struct V22 {
39  build() {
40    Column() {
41      V1R()
42      V1C()
43      V2C()
44      V2R()
45      V11()
46      V22()
47      V11R()
48      V22R()
49    }
50  }
51}
52
53@ReusableV2
54@ComponentV2
55struct V22R {
56  build() {
57    Column() {
58      V1R()
59      V1C()
60      V2C()
61      V2R()
62      V11()
63      V22()
64      V11R()
65      V22R()
66    }
67  }
68}
69
70
71@Reusable
72@Component
73struct V11R {
74  build() {
75    Column() {
76      V1R()
77      V1C()
78      V2C()
79      V2R()
80      V11()
81      V22()
82      V11R()
83      V22R()
84    }
85  }
86}
87