@@ -78,19 +78,30 @@ void runTests({
7878 setUp (() => setCurrentLogWriter (debug: debug));
7979 tearDown (() => service.resume (isolateId));
8080
81- test ('simple record type' , () async {
82- await onBreakPoint ('printSimpleLocalRecord' , (event) async {
83- final frame = event.topFrame! .index! ;
84- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
85- final instanceId = instanceRef.id! ;
86-
87- expect (instanceRef, matchRecordTypeInstanceRef (length: 2 ));
88- expect (await getObject (instanceId), matchRecordTypeInstance (length: 2 ));
89-
90- final classId = instanceRef.classRef! .id;
91- expect (await getObject (classId), matchRecordTypeClass);
92- });
93- });
81+ test (
82+ 'simple record type' ,
83+ () async {
84+ await onBreakPoint (
85+ 'printSimpleLocalRecord' ,
86+ (event) async {
87+ final frame = event.topFrame! .index! ;
88+ final instanceRef =
89+ await getInstanceRef (frame, 'record.runtimeType' );
90+ final instanceId = instanceRef.id! ;
91+
92+ expect (instanceRef, matchRecordTypeInstanceRef (length: 2 ));
93+ expect (
94+ await getObject (instanceId),
95+ matchRecordTypeInstance (length: 2 ),
96+ );
97+
98+ final classId = instanceRef.classRef! .id;
99+ expect (await getObject (classId), matchRecordTypeClass);
100+ },
101+ );
102+ },
103+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
104+ );
94105
95106 test ('simple record type elements' , () async {
96107 await onBreakPoint ('printSimpleLocalRecord' , (event) async {
@@ -126,19 +137,26 @@ void runTests({
126137 });
127138 });
128139
129- test ('complex record type' , () async {
130- await onBreakPoint ('printComplexLocalRecord' , (event) async {
131- final frame = event.topFrame! .index! ;
132- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
133- final instanceId = instanceRef.id! ;
134-
135- expect (instanceRef, matchRecordTypeInstanceRef (length: 3 ));
136- expect (await getObject (instanceId), matchRecordTypeInstance (length: 3 ));
137-
138- final classId = instanceRef.classRef! .id;
139- expect (await getObject (classId), matchRecordTypeClass);
140- });
141- });
140+ test (
141+ 'complex record type' ,
142+ () async {
143+ await onBreakPoint ('printComplexLocalRecord' , (event) async {
144+ final frame = event.topFrame! .index! ;
145+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
146+ final instanceId = instanceRef.id! ;
147+
148+ expect (instanceRef, matchRecordTypeInstanceRef (length: 3 ));
149+ expect (
150+ await getObject (instanceId),
151+ matchRecordTypeInstance (length: 3 ),
152+ );
153+
154+ final classId = instanceRef.classRef! .id;
155+ expect (await getObject (classId), matchRecordTypeClass);
156+ });
157+ },
158+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
159+ );
142160
143161 test ('complex record type elements' , () async {
144162 await onBreakPoint ('printComplexLocalRecord' , (event) async {
@@ -178,19 +196,26 @@ void runTests({
178196 });
179197 });
180198
181- test ('complex record type with named fields ' , () async {
182- await onBreakPoint ('printComplexNamedLocalRecord' , (event) async {
183- final frame = event.topFrame! .index! ;
184- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
185- final instanceId = instanceRef.id! ;
186-
187- expect (instanceRef, matchRecordTypeInstanceRef (length: 3 ));
188- expect (await getObject (instanceId), matchRecordTypeInstance (length: 3 ));
189-
190- final classId = instanceRef.classRef! .id;
191- expect (await getObject (classId), matchRecordTypeClass);
192- });
193- });
199+ test (
200+ 'complex record type with named fields ' ,
201+ () async {
202+ await onBreakPoint ('printComplexNamedLocalRecord' , (event) async {
203+ final frame = event.topFrame! .index! ;
204+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
205+ final instanceId = instanceRef.id! ;
206+
207+ expect (instanceRef, matchRecordTypeInstanceRef (length: 3 ));
208+ expect (
209+ await getObject (instanceId),
210+ matchRecordTypeInstance (length: 3 ),
211+ );
212+
213+ final classId = instanceRef.classRef! .id;
214+ expect (await getObject (classId), matchRecordTypeClass);
215+ });
216+ },
217+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
218+ );
194219
195220 test ('complex record type with named fields elements' , () async {
196221 await onBreakPoint ('printComplexNamedLocalRecord' , (event) async {
@@ -231,45 +256,56 @@ void runTests({
231256 });
232257 });
233258
234- test ('nested record type' , () async {
235- await onBreakPoint ('printNestedLocalRecord' , (event) async {
236- final frame = event.topFrame! .index! ;
237- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
238- final instanceId = instanceRef.id! ;
239-
240- expect (instanceRef, matchRecordTypeInstanceRef (length: 2 ));
241- expect (await getObject (instanceId), matchRecordTypeInstance (length: 2 ));
242-
243- final classId = instanceRef.classRef! .id;
244- expect (await getObject (classId), matchRecordTypeClass);
245- });
246- });
247-
248- test ('nested record type elements' , () async {
249- await onBreakPoint ('printNestedLocalRecord' , (event) async {
250- final frame = event.topFrame! .index! ;
251- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
252- final instanceId = instanceRef.id! ;
253-
254- final elements = await getElements (instanceId);
255- expect (
256- elements,
257- [matchTypeInstance ('bool' ), matchRecordTypeInstance (length: 2 )],
258- );
259- expect (
260- await getElements (elements[1 ].id! ),
261- [matchTypeInstance ('bool' ), matchTypeInstance ('int' )],
262- );
263- expect (
264- await getDisplayedFields (instanceRef),
265- ['bool' , '(bool, int)' ],
266- );
267- expect (
268- await getDisplayedFields (elements[1 ]),
269- ['bool' , 'int' ],
270- );
271- });
272- });
259+ test (
260+ 'nested record type' ,
261+ () async {
262+ await onBreakPoint ('printNestedLocalRecord' , (event) async {
263+ final frame = event.topFrame! .index! ;
264+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
265+ final instanceId = instanceRef.id! ;
266+
267+ expect (instanceRef, matchRecordTypeInstanceRef (length: 2 ));
268+ expect (
269+ await getObject (instanceId),
270+ matchRecordTypeInstance (length: 2 ),
271+ );
272+
273+ final classId = instanceRef.classRef! .id;
274+ expect (await getObject (classId), matchRecordTypeClass);
275+ });
276+ },
277+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
278+ );
279+
280+ test (
281+ 'nested record type elements' ,
282+ () async {
283+ await onBreakPoint ('printNestedLocalRecord' , (event) async {
284+ final frame = event.topFrame! .index! ;
285+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
286+ final instanceId = instanceRef.id! ;
287+
288+ final elements = await getElements (instanceId);
289+ expect (
290+ elements,
291+ [matchTypeInstance ('bool' ), matchRecordTypeInstance (length: 2 )],
292+ );
293+ expect (
294+ await getElements (elements[1 ].id! ),
295+ [matchTypeInstance ('bool' ), matchTypeInstance ('int' )],
296+ );
297+ expect (
298+ await getDisplayedFields (instanceRef),
299+ ['bool' , '(bool, int)' ],
300+ );
301+ expect (
302+ await getDisplayedFields (elements[1 ]),
303+ ['bool' , 'int' ],
304+ );
305+ });
306+ },
307+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
308+ );
273309
274310 test ('nested record type display' , () async {
275311 await onBreakPoint ('printNestedLocalRecord' , (event) async {
@@ -288,68 +324,80 @@ void runTests({
288324 });
289325 });
290326
291- test ('nested record type with named fields' , () async {
292- await onBreakPoint ('printNestedNamedLocalRecord' , (event) async {
293- final frame = event.topFrame! .index! ;
294- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
295- final instanceId = instanceRef.id! ;
296- final instance = await getObject (instanceId);
297-
298- expect (instanceRef, matchRecordTypeInstanceRef (length: 2 ));
299- expect (instance, matchRecordTypeInstance (length: 2 ));
300-
301- final classId = instanceRef.classRef! .id;
302- expect (await getObject (classId), matchRecordTypeClass);
303- });
304- });
305-
306- test ('nested record type with named fields elements' , () async {
307- await onBreakPoint ('printNestedNamedLocalRecord' , (event) async {
308- final frame = event.topFrame! .index! ;
309- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
310- final instanceId = instanceRef.id! ;
311-
312- final elements = await getElements (instanceId);
313- expect (
314- elements,
315- [matchTypeInstance ('bool' ), matchRecordTypeInstance (length: 2 )],
316- );
317- expect (
318- await getElements (elements[1 ].id! ),
319- [matchTypeInstance ('bool' ), matchTypeInstance ('int' )],
320- );
321- expect (
322- await getDisplayedFields (instanceRef),
323- ['bool' , '(bool, int)' ],
324- );
325- expect (
326- await getDisplayedFields (elements[1 ]),
327- ['bool' , 'int' ],
328- );
329- });
330- });
331-
332- test ('nested record type with named fields display' , () async {
333- await onBreakPoint ('printNestedNamedLocalRecord' , (event) async {
334- final frame = event.topFrame! .index! ;
335- final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
336- final instance = await getObject (instanceRef.id! );
337- final typeClassId = instance.classRef! .id;
338-
339- expect (await getObject (typeClassId), matchRecordTypeClass);
340-
341- final typeStringRef =
342- await getInstanceRef (frame, 'record.runtimeType.toString()' );
343- final typeStringId = typeStringRef.id! ;
344-
345- expect (
346- await getObject (typeStringId),
347- matchPrimitiveInstance (
348- kind: InstanceKind .kString,
349- value: '(bool, {(bool, int) inner})' ,
350- ),
351- );
352- });
353- });
327+ test (
328+ 'nested record type with named fields' ,
329+ () async {
330+ await onBreakPoint ('printNestedNamedLocalRecord' , (event) async {
331+ final frame = event.topFrame! .index! ;
332+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
333+ final instanceId = instanceRef.id! ;
334+ final instance = await getObject (instanceId);
335+
336+ expect (instanceRef, matchRecordTypeInstanceRef (length: 2 ));
337+ expect (instance, matchRecordTypeInstance (length: 2 ));
338+
339+ final classId = instanceRef.classRef! .id;
340+ expect (await getObject (classId), matchRecordTypeClass);
341+ });
342+ },
343+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
344+ );
345+
346+ test (
347+ 'nested record type with named fields elements' ,
348+ () async {
349+ await onBreakPoint ('printNestedNamedLocalRecord' , (event) async {
350+ final frame = event.topFrame! .index! ;
351+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
352+ final instanceId = instanceRef.id! ;
353+
354+ final elements = await getElements (instanceId);
355+ expect (
356+ elements,
357+ [matchTypeInstance ('bool' ), matchRecordTypeInstance (length: 2 )],
358+ );
359+ expect (
360+ await getElements (elements[1 ].id! ),
361+ [matchTypeInstance ('bool' ), matchTypeInstance ('int' )],
362+ );
363+ expect (
364+ await getDisplayedFields (instanceRef),
365+ ['bool' , '(bool, int)' ],
366+ );
367+ expect (
368+ await getDisplayedFields (elements[1 ]),
369+ ['bool' , 'int' ],
370+ );
371+ });
372+ },
373+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
374+ );
375+
376+ test (
377+ 'nested record type with named fields display' ,
378+ () async {
379+ await onBreakPoint ('printNestedNamedLocalRecord' , (event) async {
380+ final frame = event.topFrame! .index! ;
381+ final instanceRef = await getInstanceRef (frame, 'record.runtimeType' );
382+ final instance = await getObject (instanceRef.id! );
383+ final typeClassId = instance.classRef! .id;
384+
385+ expect (await getObject (typeClassId), matchRecordTypeClass);
386+
387+ final typeStringRef =
388+ await getInstanceRef (frame, 'record.runtimeType.toString()' );
389+ final typeStringId = typeStringRef.id! ;
390+
391+ expect (
392+ await getObject (typeStringId),
393+ matchPrimitiveInstance (
394+ kind: InstanceKind .kString,
395+ value: '(bool, {(bool, int) inner})' ,
396+ ),
397+ );
398+ });
399+ },
400+ skip: 'https://github.com/dart-lang/webdev/issues/2351' ,
401+ );
354402 });
355403}
0 commit comments