MCPcopy Create free account
hub / github.com/google/gapid / TestBoxSimpleTypes

Function TestBoxSimpleTypes

gapis/service/box/box_test.go:143–242  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

141}
142
143func TestBoxSimpleTypes(t *testing.T) {
144 ctx := log.Testing(t)
145 ty := box.NewType(reflect.TypeOf(StructA{}))
146 got, _ := json.MarshalIndent(ty, "", " ")
147 expect := `{
148 "type_id": 1,
149 "Ty": {
150 "Struct": {
151 "fields": [
152 {
153 "type": {
154 "Ty": {
155 "Pod": 13
156 }
157 },
158 "name": "Bool"
159 },
160 {
161 "type": {
162 "Ty": {
163 "Pod": 4
164 }
165 },
166 "name": "Int"
167 },
168 {
169 "type": {
170 "Ty": {
171 "Pod": 1
172 }
173 },
174 "name": "Float"
175 },
176 {
177 "type": {
178 "type_id": 2,
179 "Ty": {
180 "Map": {
181 "key_type": {
182 "Ty": {
183 "Pod": 14
184 }
185 },
186 "value_type": {
187 "Ty": {
188 "Pod": 4
189 }
190 }
191 }
192 }
193 },
194 "name": "Map"
195 },
196 {
197 "type": {
198 "Ty": {
199 "Pod": 19
200 }

Callers

nothing calls this directly

Calls 4

ThatStringMethod · 0.80
ForMethod · 0.80
EqualsMethod · 0.65
TypeOfMethod · 0.45

Tested by

no test coverage detected