From feef276e5c941f7099f8d88d220585fc84bea3bc Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Fri, 19 Jan 2024 15:06:47 -0800 Subject: [PATCH 1/5] Skip record type inspection tests --- .../common/record_type_inspection_common.dart | 27 ++++++++++++++----- .../test/instances/common/test_inspector.dart | 19 +++++++++++-- .../common/type_inspection_common.dart | 4 ++- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/dwds/test/instances/common/record_type_inspection_common.dart b/dwds/test/instances/common/record_type_inspection_common.dart index 9e5eb9189..b7b337daa 100644 --- a/dwds/test/instances/common/record_type_inspection_common.dart +++ b/dwds/test/instances/common/record_type_inspection_common.dart @@ -89,8 +89,11 @@ void runTests({ final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); - }); - }); + }, + ); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('simple record type elements', () async { await onBreakPoint('printSimpleLocalRecord', (event) async { @@ -138,7 +141,9 @@ void runTests({ final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); }); - }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('complex record type elements', () async { await onBreakPoint('printComplexLocalRecord', (event) async { @@ -190,7 +195,9 @@ void runTests({ final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); }); - }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('complex record type with named fields elements', () async { await onBreakPoint('printComplexNamedLocalRecord', (event) async { @@ -243,7 +250,9 @@ void runTests({ final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); }); - }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('nested record type elements', () async { await onBreakPoint('printNestedLocalRecord', (event) async { @@ -301,7 +310,9 @@ void runTests({ final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); }); - }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('nested record type with named fields elements', () async { await onBreakPoint('printNestedNamedLocalRecord', (event) async { @@ -350,6 +361,8 @@ void runTests({ ), ); }); - }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); }); } diff --git a/dwds/test/instances/common/test_inspector.dart b/dwds/test/instances/common/test_inspector.dart index 17714617b..bdbef352f 100644 --- a/dwds/test/instances/common/test_inspector.dart +++ b/dwds/test/instances/common/test_inspector.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'package:test/test.dart'; +import 'package:test_common/utilities.dart'; import 'package:vm_service/vm_service.dart'; import '../../fixtures/context.dart'; @@ -216,7 +217,14 @@ Matcher matchRecordInstanceRef({required int length}) => isA() .having((e) => e.classRef!, 'classRef', matchRecordClassRef); Matcher matchRecordTypeInstanceRef({required int length}) => isA() - .having((e) => e.kind, 'kind', InstanceKind.kRecordType) + .having( + (e) => e.kind, + 'kind', + // TODO(https://github.com/dart-lang/webdev/issues/2351) Switch to dev version check. + dartSdkIsAtLeast('3.4.0-edge.eeec4d36e3ea9b166da277a46f62d7d3b9ce645a') + ? InstanceKind.kType + : InstanceKind.kRecordType, + ) .having((e) => e.length, 'length', length) .having((e) => e.classRef!, 'classRef', matchRecordTypeClassRef); @@ -280,7 +288,14 @@ Matcher matchTypeInstance(dynamic name) => isA() Matcher matchRecordClass = matchClass(name: matchRecordClassName, libraryId: _dartCoreLibrary); Matcher matchRecordTypeClass = - matchClass(name: matchRecordTypeClassName, libraryId: _dartRuntimeLibrary); + matchClass( + name: + // TODO(https://github.com/dart-lang/webdev/issues/2351) Switch to dev version check. + dartSdkIsAtLeast('3.4.0-edge.eeec4d36e3ea9b166da277a46f62d7d3b9ce645a') + ? InstanceKind.kType + : InstanceKind.kRecordType, + libraryId: _dartRuntimeLibrary, +); Matcher matchTypeClass = matchClass(name: matchTypeClassName, libraryId: _dartCoreLibrary); diff --git a/dwds/test/instances/common/type_inspection_common.dart b/dwds/test/instances/common/type_inspection_common.dart index aadf4a828..0e56f45c1 100644 --- a/dwds/test/instances/common/type_inspection_common.dart +++ b/dwds/test/instances/common/type_inspection_common.dart @@ -207,7 +207,9 @@ void runTests({ ['int', 'String'], ); }); - }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('class type', () async { await onBreakPoint('printSimpleLocalRecord', (event) async { From cdff25f976fdd77e103c11f3e8ca4a38029034f1 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Fri, 19 Jan 2024 15:13:43 -0800 Subject: [PATCH 2/5] Dart format --- .../common/record_type_inspection_common.dart | 181 ++++++++++-------- .../test/instances/common/test_inspector.dart | 3 +- .../common/type_inspection_common.dart | 53 ++--- 3 files changed, 129 insertions(+), 108 deletions(-) diff --git a/dwds/test/instances/common/record_type_inspection_common.dart b/dwds/test/instances/common/record_type_inspection_common.dart index b7b337daa..289935a04 100644 --- a/dwds/test/instances/common/record_type_inspection_common.dart +++ b/dwds/test/instances/common/record_type_inspection_common.dart @@ -78,17 +78,23 @@ void runTests({ setUp(() => setCurrentLogWriter(debug: debug)); tearDown(() => service.resume(isolateId)); - test('simple record type', () async { - await onBreakPoint('printSimpleLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 2)); - - final classId = instanceRef.classRef!.id; - expect(await getObject(classId), matchRecordTypeClass); + test( + 'simple record type', + () async { + await onBreakPoint( + 'printSimpleLocalRecord', + (event) async { + final frame = event.topFrame!.index!; + final instanceRef = + await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + expect(await getObject(instanceId), + matchRecordTypeInstance(length: 2)); + + final classId = instanceRef.classRef!.id; + expect(await getObject(classId), matchRecordTypeClass); }, ); }, @@ -129,18 +135,21 @@ void runTests({ }); }); - test('complex record type', () async { - await onBreakPoint('printComplexLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 3)); - - final classId = instanceRef.classRef!.id; - expect(await getObject(classId), matchRecordTypeClass); - }); + test( + 'complex record type', + () async { + await onBreakPoint('printComplexLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); + expect( + await getObject(instanceId), matchRecordTypeInstance(length: 3)); + + final classId = instanceRef.classRef!.id; + expect(await getObject(classId), matchRecordTypeClass); + }); }, skip: 'https://github.com/dart-lang/webdev/issues/2351', ); @@ -183,18 +192,21 @@ void runTests({ }); }); - test('complex record type with named fields ', () async { - await onBreakPoint('printComplexNamedLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 3)); - - final classId = instanceRef.classRef!.id; - expect(await getObject(classId), matchRecordTypeClass); - }); + test( + 'complex record type with named fields ', + () async { + await onBreakPoint('printComplexNamedLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); + expect( + await getObject(instanceId), matchRecordTypeInstance(length: 3)); + + final classId = instanceRef.classRef!.id; + expect(await getObject(classId), matchRecordTypeClass); + }); }, skip: 'https://github.com/dart-lang/webdev/issues/2351', ); @@ -238,18 +250,21 @@ void runTests({ }); }); - test('nested record type', () async { - await onBreakPoint('printNestedLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(await getObject(instanceId), matchRecordTypeInstance(length: 2)); - - final classId = instanceRef.classRef!.id; - expect(await getObject(classId), matchRecordTypeClass); - }); + test( + 'nested record type', + () async { + await onBreakPoint('printNestedLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + expect( + await getObject(instanceId), matchRecordTypeInstance(length: 2)); + + final classId = instanceRef.classRef!.id; + expect(await getObject(classId), matchRecordTypeClass); + }); }, skip: 'https://github.com/dart-lang/webdev/issues/2351', ); @@ -297,19 +312,21 @@ void runTests({ }); }); - test('nested record type with named fields', () async { - await onBreakPoint('printNestedNamedLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(instance, matchRecordTypeInstance(length: 2)); - - final classId = instanceRef.classRef!.id; - expect(await getObject(classId), matchRecordTypeClass); - }); + test( + 'nested record type with named fields', + () async { + await onBreakPoint('printNestedNamedLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + expect(instance, matchRecordTypeInstance(length: 2)); + + final classId = instanceRef.classRef!.id; + expect(await getObject(classId), matchRecordTypeClass); + }); }, skip: 'https://github.com/dart-lang/webdev/issues/2351', ); @@ -340,27 +357,29 @@ void runTests({ }); }); - test('nested record type with named fields display', () async { - await onBreakPoint('printNestedNamedLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instance = await getObject(instanceRef.id!); - final typeClassId = instance.classRef!.id; - - expect(await getObject(typeClassId), matchRecordTypeClass); - - final typeStringRef = - await getInstanceRef(frame, 'record.runtimeType.toString()'); - final typeStringId = typeStringRef.id!; - - expect( - await getObject(typeStringId), - matchPrimitiveInstance( - kind: InstanceKind.kString, - value: '(bool, {(bool, int) inner})', - ), - ); - }); + test( + 'nested record type with named fields display', + () async { + await onBreakPoint('printNestedNamedLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instance = await getObject(instanceRef.id!); + final typeClassId = instance.classRef!.id; + + expect(await getObject(typeClassId), matchRecordTypeClass); + + final typeStringRef = + await getInstanceRef(frame, 'record.runtimeType.toString()'); + final typeStringId = typeStringRef.id!; + + expect( + await getObject(typeStringId), + matchPrimitiveInstance( + kind: InstanceKind.kString, + value: '(bool, {(bool, int) inner})', + ), + ); + }); }, skip: 'https://github.com/dart-lang/webdev/issues/2351', ); diff --git a/dwds/test/instances/common/test_inspector.dart b/dwds/test/instances/common/test_inspector.dart index bdbef352f..5f67e8703 100644 --- a/dwds/test/instances/common/test_inspector.dart +++ b/dwds/test/instances/common/test_inspector.dart @@ -287,8 +287,7 @@ Matcher matchTypeInstance(dynamic name) => isA() Matcher matchRecordClass = matchClass(name: matchRecordClassName, libraryId: _dartCoreLibrary); -Matcher matchRecordTypeClass = - matchClass( +Matcher matchRecordTypeClass = matchClass( name: // TODO(https://github.com/dart-lang/webdev/issues/2351) Switch to dev version check. dartSdkIsAtLeast('3.4.0-edge.eeec4d36e3ea9b166da277a46f62d7d3b9ce645a') diff --git a/dwds/test/instances/common/type_inspection_common.dart b/dwds/test/instances/common/type_inspection_common.dart index 0e56f45c1..a847314a7 100644 --- a/dwds/test/instances/common/type_inspection_common.dart +++ b/dwds/test/instances/common/type_inspection_common.dart @@ -182,31 +182,34 @@ void runTests({ }); }); - test('record type', () async { - await onBreakPoint('printSimpleLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, "(0,'a').runtimeType"); - expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - - final instanceId = instanceRef.id!; - final instance = await getObject(instanceId); - expect(instance, matchRecordTypeInstance(length: 2)); - expect( - await getElements(instanceId), - [matchTypeInstance('int'), matchTypeInstance('String')], - ); - - final classId = instanceRef.classRef!.id; - expect(await getObject(classId), matchRecordTypeClass); - expect( - await getFields(instanceRef, depth: 2), - {1: matchTypeObject, 2: matchTypeObject}, - ); - expect( - await getDisplayedFields(instanceRef), - ['int', 'String'], - ); - }); + test( + 'record type', + () async { + await onBreakPoint('printSimpleLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = + await getInstanceRef(frame, "(0,'a').runtimeType"); + expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); + + final instanceId = instanceRef.id!; + final instance = await getObject(instanceId); + expect(instance, matchRecordTypeInstance(length: 2)); + expect( + await getElements(instanceId), + [matchTypeInstance('int'), matchTypeInstance('String')], + ); + + final classId = instanceRef.classRef!.id; + expect(await getObject(classId), matchRecordTypeClass); + expect( + await getFields(instanceRef, depth: 2), + {1: matchTypeObject, 2: matchTypeObject}, + ); + expect( + await getDisplayedFields(instanceRef), + ['int', 'String'], + ); + }); }, skip: 'https://github.com/dart-lang/webdev/issues/2351', ); From 032437321f888ff809dfeaa8a11885619b14f41d Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Fri, 19 Jan 2024 15:17:58 -0800 Subject: [PATCH 3/5] Dart fix --- .../instances/common/record_type_inspection_common.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dwds/test/instances/common/record_type_inspection_common.dart b/dwds/test/instances/common/record_type_inspection_common.dart index 289935a04..719383dc0 100644 --- a/dwds/test/instances/common/record_type_inspection_common.dart +++ b/dwds/test/instances/common/record_type_inspection_common.dart @@ -91,7 +91,7 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); expect(await getObject(instanceId), - matchRecordTypeInstance(length: 2)); + matchRecordTypeInstance(length: 2),); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); @@ -145,7 +145,7 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); expect( - await getObject(instanceId), matchRecordTypeInstance(length: 3)); + await getObject(instanceId), matchRecordTypeInstance(length: 3),); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); @@ -202,7 +202,7 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); expect( - await getObject(instanceId), matchRecordTypeInstance(length: 3)); + await getObject(instanceId), matchRecordTypeInstance(length: 3),); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); @@ -260,7 +260,7 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); expect( - await getObject(instanceId), matchRecordTypeInstance(length: 2)); + await getObject(instanceId), matchRecordTypeInstance(length: 2),); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); From 9cb3341749fd20073b452a2a9c5cee92ac242434 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Fri, 19 Jan 2024 15:26:02 -0800 Subject: [PATCH 4/5] and format again --- .../common/record_type_inspection_common.dart | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dwds/test/instances/common/record_type_inspection_common.dart b/dwds/test/instances/common/record_type_inspection_common.dart index 719383dc0..49198c3c4 100644 --- a/dwds/test/instances/common/record_type_inspection_common.dart +++ b/dwds/test/instances/common/record_type_inspection_common.dart @@ -90,8 +90,10 @@ void runTests({ final instanceId = instanceRef.id!; expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); - expect(await getObject(instanceId), - matchRecordTypeInstance(length: 2),); + expect( + await getObject(instanceId), + matchRecordTypeInstance(length: 2), + ); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); @@ -145,7 +147,9 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); expect( - await getObject(instanceId), matchRecordTypeInstance(length: 3),); + await getObject(instanceId), + matchRecordTypeInstance(length: 3), + ); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); @@ -202,7 +206,9 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 3)); expect( - await getObject(instanceId), matchRecordTypeInstance(length: 3),); + await getObject(instanceId), + matchRecordTypeInstance(length: 3), + ); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); @@ -260,7 +266,9 @@ void runTests({ expect(instanceRef, matchRecordTypeInstanceRef(length: 2)); expect( - await getObject(instanceId), matchRecordTypeInstance(length: 2),); + await getObject(instanceId), + matchRecordTypeInstance(length: 2), + ); final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchRecordTypeClass); From 61b6f7cec36ca5651671a93cb871fbada55d0526 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:40:22 -0800 Subject: [PATCH 5/5] Missed some tests --- .../common/record_type_inspection_common.dart | 104 ++++++++++-------- .../test/instances/common/test_inspector.dart | 5 +- 2 files changed, 59 insertions(+), 50 deletions(-) diff --git a/dwds/test/instances/common/record_type_inspection_common.dart b/dwds/test/instances/common/record_type_inspection_common.dart index 49198c3c4..1d41bdbff 100644 --- a/dwds/test/instances/common/record_type_inspection_common.dart +++ b/dwds/test/instances/common/record_type_inspection_common.dart @@ -277,31 +277,35 @@ void runTests({ skip: 'https://github.com/dart-lang/webdev/issues/2351', ); - test('nested record type elements', () async { - await onBreakPoint('printNestedLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; + test( + 'nested record type elements', + () async { + await onBreakPoint('printNestedLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; - final elements = await getElements(instanceId); - expect( - elements, - [matchTypeInstance('bool'), matchRecordTypeInstance(length: 2)], - ); - expect( - await getElements(elements[1].id!), - [matchTypeInstance('bool'), matchTypeInstance('int')], - ); - expect( - await getDisplayedFields(instanceRef), - ['bool', '(bool, int)'], - ); - expect( - await getDisplayedFields(elements[1]), - ['bool', 'int'], - ); - }); - }); + final elements = await getElements(instanceId); + expect( + elements, + [matchTypeInstance('bool'), matchRecordTypeInstance(length: 2)], + ); + expect( + await getElements(elements[1].id!), + [matchTypeInstance('bool'), matchTypeInstance('int')], + ); + expect( + await getDisplayedFields(instanceRef), + ['bool', '(bool, int)'], + ); + expect( + await getDisplayedFields(elements[1]), + ['bool', 'int'], + ); + }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test('nested record type display', () async { await onBreakPoint('printNestedLocalRecord', (event) async { @@ -339,31 +343,35 @@ void runTests({ skip: 'https://github.com/dart-lang/webdev/issues/2351', ); - test('nested record type with named fields elements', () async { - await onBreakPoint('printNestedNamedLocalRecord', (event) async { - final frame = event.topFrame!.index!; - final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); - final instanceId = instanceRef.id!; + test( + 'nested record type with named fields elements', + () async { + await onBreakPoint('printNestedNamedLocalRecord', (event) async { + final frame = event.topFrame!.index!; + final instanceRef = await getInstanceRef(frame, 'record.runtimeType'); + final instanceId = instanceRef.id!; - final elements = await getElements(instanceId); - expect( - elements, - [matchTypeInstance('bool'), matchRecordTypeInstance(length: 2)], - ); - expect( - await getElements(elements[1].id!), - [matchTypeInstance('bool'), matchTypeInstance('int')], - ); - expect( - await getDisplayedFields(instanceRef), - ['bool', '(bool, int)'], - ); - expect( - await getDisplayedFields(elements[1]), - ['bool', 'int'], - ); - }); - }); + final elements = await getElements(instanceId); + expect( + elements, + [matchTypeInstance('bool'), matchRecordTypeInstance(length: 2)], + ); + expect( + await getElements(elements[1].id!), + [matchTypeInstance('bool'), matchTypeInstance('int')], + ); + expect( + await getDisplayedFields(instanceRef), + ['bool', '(bool, int)'], + ); + expect( + await getDisplayedFields(elements[1]), + ['bool', 'int'], + ); + }); + }, + skip: 'https://github.com/dart-lang/webdev/issues/2351', + ); test( 'nested record type with named fields display', diff --git a/dwds/test/instances/common/test_inspector.dart b/dwds/test/instances/common/test_inspector.dart index 5f67e8703..dc500cd5b 100644 --- a/dwds/test/instances/common/test_inspector.dart +++ b/dwds/test/instances/common/test_inspector.dart @@ -220,7 +220,8 @@ Matcher matchRecordTypeInstanceRef({required int length}) => isA() .having( (e) => e.kind, 'kind', - // TODO(https://github.com/dart-lang/webdev/issues/2351) Switch to dev version check. + // See https://github.com/dart-lang/sdk/commit/67e052d7e996be8ad9d02970117ffef07eab1c77. + // TODO() Can't compare edge verisons, wait for this to get to a dev release. dartSdkIsAtLeast('3.4.0-edge.eeec4d36e3ea9b166da277a46f62d7d3b9ce645a') ? InstanceKind.kType : InstanceKind.kRecordType, @@ -289,7 +290,7 @@ Matcher matchRecordClass = matchClass(name: matchRecordClassName, libraryId: _dartCoreLibrary); Matcher matchRecordTypeClass = matchClass( name: - // TODO(https://github.com/dart-lang/webdev/issues/2351) Switch to dev version check. + // See https://github.com/dart-lang/sdk/commit/67e052d7e996be8ad9d02970117ffef07eab1c77: dartSdkIsAtLeast('3.4.0-edge.eeec4d36e3ea9b166da277a46f62d7d3b9ce645a') ? InstanceKind.kType : InstanceKind.kRecordType,