@@ -67,28 +67,60 @@ impeller_component("aiks_playground") {
67
67
]
68
68
}
69
69
70
- impeller_component (" aiks_unittests " ) {
70
+ impeller_component (" context_spy " ) {
71
71
testonly = true
72
72
73
73
sources = [
74
- " aiks_unittests.cc" ,
75
- " canvas_recorder_unittests.cc" ,
76
- " canvas_unittests.cc" ,
77
74
" testing/context_mock.h" ,
78
75
" testing/context_spy.cc" ,
79
76
" testing/context_spy.h" ,
80
- " trace_serializer_unittests.cc" ,
81
77
]
82
78
deps = [
83
- " :aiks" ,
84
- " :aiks_playground" ,
85
- " //flutter/impeller/geometry:geometry_asserts" ,
86
- " //flutter/impeller/golden_tests:golden_playground_test" ,
87
- " //flutter/impeller/playground:playground_test" ,
88
- " //flutter/impeller/scene" ,
89
- " //flutter/impeller/typographer/backends/stb:typographer_stb_backend" ,
79
+ " //flutter/impeller/renderer" ,
90
80
" //flutter/testing:testing_lib" ,
91
- " //flutter/third_party/txt" ,
81
+ ]
82
+ }
83
+
84
+ template (" aiks_unittests_component" ) {
85
+ target_name = invoker .target_name
86
+ predefined_sources = [
87
+ " aiks_gradient_unittests.cc" ,
88
+ " aiks_unittests.cc" ,
89
+ " aiks_unittests.h" ,
90
+ ]
91
+ additional_sources = []
92
+ if (defined (invoker .sources )) {
93
+ additional_sources = invoker .sources
94
+ }
95
+ impeller_component (target_name ) {
96
+ testonly = true
97
+ if (defined (invoker .defines )) {
98
+ defines = invoker .defines
99
+ }
100
+ sources = predefined_sources + additional_sources
101
+ deps = [
102
+ " :aiks" ,
103
+ " :aiks_playground" ,
104
+ " :context_spy" ,
105
+ " //flutter/impeller/geometry:geometry_asserts" ,
106
+ " //flutter/impeller/golden_tests:golden_playground_test" ,
107
+ " //flutter/impeller/playground:playground_test" ,
108
+ " //flutter/impeller/scene" ,
109
+ " //flutter/impeller/typographer/backends/stb:typographer_stb_backend" ,
110
+ " //flutter/testing:testing_lib" ,
111
+ " //flutter/third_party/txt" ,
112
+ ]
113
+ if (defined (invoker .public_configs )) {
114
+ public_configs = invoker .public_configs
115
+ }
116
+ }
117
+ }
118
+
119
+ aiks_unittests_component (" aiks_unittests" ) {
120
+ sources = [
121
+ " canvas_recorder_unittests.cc" ,
122
+ " canvas_unittests.cc" ,
123
+ " trace_serializer_unittests.cc" ,
92
124
]
93
125
94
126
if (! impeller_trace_canvas ) {
@@ -97,31 +129,11 @@ impeller_component("aiks_unittests") {
97
129
}
98
130
}
99
131
100
- impeller_component (" aiks_unittests_golden" ) {
101
- testonly = true
102
-
132
+ aiks_unittests_component (" aiks_unittests_golden" ) {
103
133
defines = [
104
134
" IMPELLER_GOLDEN_TESTS" ,
105
135
" IMPELLER_ENABLE_VALIDATION=1" ,
106
136
]
107
-
108
- sources = [
109
- " aiks_unittests.cc" ,
110
- " testing/context_mock.h" ,
111
- " testing/context_spy.cc" ,
112
- " testing/context_spy.h" ,
113
- ]
114
- deps = [
115
- " :aiks" ,
116
- " :aiks_playground" ,
117
- " //flutter/impeller/geometry:geometry_asserts" ,
118
- " //flutter/impeller/golden_tests:golden_playground_test" ,
119
- " //flutter/impeller/playground:playground_test" ,
120
- " //flutter/impeller/scene" ,
121
- " //flutter/impeller/typographer/backends/stb:typographer_stb_backend" ,
122
- " //flutter/testing:testing_lib" ,
123
- " //flutter/third_party/txt" ,
124
- ]
125
137
}
126
138
127
139
executable (" canvas_benchmarks" ) {
0 commit comments