diff --git a/dwds/test/instances/common/instance_common.dart b/dwds/test/instances/common/instance_common.dart index 2d18ba6c3..ce52a4f3c 100644 --- a/dwds/test/instances/common/instance_common.dart +++ b/dwds/test/instances/common/instance_common.dart @@ -1,4 +1,4 @@ -// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @@ -62,9 +62,7 @@ void runTests({ /// A reference to the the variable `libraryPublicFinal`, an instance of /// `MyTestClass`. - Future libraryPublicFinal( - CompilationMode compilationMode, - ) => + Future libraryPublicFinal(CompilationMode compilationMode) => inspector.jsEvaluate( libraryVariableExpression('libraryPublicFinal', compilationMode), ); diff --git a/dwds/test/instances/common/instance_inspection_common.dart b/dwds/test/instances/common/instance_inspection_common.dart index 16e0befd5..2f60ab39c 100644 --- a/dwds/test/instances/common/instance_inspection_common.dart +++ b/dwds/test/instances/common/instance_inspection_common.dart @@ -184,12 +184,7 @@ void runTests({ final instanceRef = await getInstanceRef(frame, 'list'); final instanceId = instanceRef.id!; - expect( - await getObject(instanceId), - matchListInstance( - type: canaryFeatures ? 'JSArray' : 'List', - ), - ); + expect(await getObject(instanceId), matchListInstance(type: 'int')); expect(await getFields(instanceRef), [0, 1, 2]); expect(await getFields(instanceRef, offset: 1, count: 0), []); diff --git a/dwds/test/instances/common/patterns_inspection_common.dart b/dwds/test/instances/common/patterns_inspection_common.dart index 8beffb381..a29dbfaa3 100644 --- a/dwds/test/instances/common/patterns_inspection_common.dart +++ b/dwds/test/instances/common/patterns_inspection_common.dart @@ -78,7 +78,7 @@ Future runTests({ final frame = event.topFrame!; expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: matchListClassName('Object')), + 'obj': matchListInstance(type: 'Object'), 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'a'), 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 1), }); @@ -90,7 +90,7 @@ Future runTests({ final frame = event.topFrame!; expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: matchListClassName('Object')), + 'obj': matchListInstance(type: 'Object'), 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14), }); @@ -105,7 +105,7 @@ Future runTests({ expect(await getFields(instanceRef), [0, 1]); expect(await getFrameVariables(frame), { - 'obj': matchListInstance(type: matchListClassName('int')), + 'obj': matchListInstance(type: 'int'), }); }); }); @@ -153,7 +153,7 @@ Future runTests({ final vars = await getFrameVariables(frame); expect(vars, { 'dog': matchPrimitiveInstance(kind: 'String', value: 'Prismo'), - 'cats': matchListInstance(type: matchListClassName('String')), + 'cats': matchListInstance(type: 'String'), 'firstCat': matchPrimitiveInstance(kind: 'String', value: 'Garfield'), 'secondCat': matchPrimitiveInstance(kind: 'String', value: 'Tom'), }); diff --git a/dwds/test/instances/common/test_inspector.dart b/dwds/test/instances/common/test_inspector.dart index 98762495f..3319c9416 100644 --- a/dwds/test/instances/common/test_inspector.dart +++ b/dwds/test/instances/common/test_inspector.dart @@ -296,8 +296,10 @@ Matcher matchRecordTypeClassRef = matchClassRef( ); Matcher matchTypeClassRef = matchClassRef(name: matchTypeClassName, libraryId: _dartCoreLibrary); -Matcher matchListClassRef(dynamic type) => - matchClassRef(name: type, libraryId: _matchListLibraryName); +Matcher matchListClassRef(String type) => matchClassRef( + name: matchListClassName(type), + libraryId: _matchListLibraryName, + ); Matcher matchMapClassRef(String type) => matchClassRef(name: type, libraryId: _dartJsHelperLibrary); Matcher matchSetClassRef(String type) => diff --git a/dwds/test/instances/common/type_inspection_common.dart b/dwds/test/instances/common/type_inspection_common.dart index a7dbacb2c..cc182ae93 100644 --- a/dwds/test/instances/common/type_inspection_common.dart +++ b/dwds/test/instances/common/type_inspection_common.dart @@ -17,8 +17,8 @@ void runTests({ required bool canaryFeatures, required bool debug, }) { - final context = - TestContext(TestProject.testExperimentWithSoundNullSafety, provider); + final project = TestProject.testExperimentWithSoundNullSafety; + final context = TestContext(project, provider); final testInspector = TestInspector(context); late VmServiceInterface service; @@ -105,7 +105,6 @@ void runTests({ final classId = instanceRef.classRef!.id; expect(await getObject(classId), matchTypeClass); - expect(await getFields(instanceRef, depth: 1), matchTypeObject); expect(await getDisplayedFields(instanceRef), matchDisplayedTypeObject); }); diff --git a/dwds/test/instances/instance_canary_test.dart b/dwds/test/instances/instance_canary_test.dart index 72f40edb9..f1f7d4159 100644 --- a/dwds/test/instances/instance_canary_test.dart +++ b/dwds/test/instances/instance_canary_test.dart @@ -20,7 +20,7 @@ void main() { final debug = false; final canaryFeatures = true; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, diff --git a/dwds/test/instances/instance_inspection_canary_test.dart b/dwds/test/instances/instance_inspection_canary_test.dart index 4236e93c7..704e19b28 100644 --- a/dwds/test/instances/instance_inspection_canary_test.dart +++ b/dwds/test/instances/instance_inspection_canary_test.dart @@ -18,7 +18,7 @@ void main() { final debug = false; final canaryFeatures = true; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, @@ -29,6 +29,9 @@ void main() { runTests( provider: provider, compilationMode: compilationMode, + // Note: not running with weak null safety because it + // requires a special branch of build_web_compilers + // that does not support --canary flag. nullSafetyMode: NullSafety.sound, canaryFeatures: canaryFeatures, debug: debug, diff --git a/dwds/test/instances/instance_inspection_test.dart b/dwds/test/instances/instance_inspection_test.dart index 546c8c32a..53c5b4022 100644 --- a/dwds/test/instances/instance_inspection_test.dart +++ b/dwds/test/instances/instance_inspection_test.dart @@ -18,7 +18,7 @@ void main() { final debug = false; final canaryFeatures = false; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/instance_test.dart b/dwds/test/instances/instance_test.dart index 105cc84e6..d57795479 100644 --- a/dwds/test/instances/instance_test.dart +++ b/dwds/test/instances/instance_test.dart @@ -16,7 +16,7 @@ void main() { final debug = false; final canaryFeatures = false; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( canaryFeatures: canaryFeatures, verbose: debug, diff --git a/dwds/test/instances/patterns_inspection_canary_test.dart b/dwds/test/instances/patterns_inspection_canary_test.dart index 743a644d4..30559bec8 100644 --- a/dwds/test/instances/patterns_inspection_canary_test.dart +++ b/dwds/test/instances/patterns_inspection_canary_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = true; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/patterns_inspection_test.dart b/dwds/test/instances/patterns_inspection_test.dart index 1f802b152..1b6b7f2a7 100644 --- a/dwds/test/instances/patterns_inspection_test.dart +++ b/dwds/test/instances/patterns_inspection_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = false; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/record_inspection_canary_test.dart b/dwds/test/instances/record_inspection_canary_test.dart index 6b216ccc6..dc65290f7 100644 --- a/dwds/test/instances/record_inspection_canary_test.dart +++ b/dwds/test/instances/record_inspection_canary_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = true; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/record_inspection_test.dart b/dwds/test/instances/record_inspection_test.dart index bbc7de3dd..0cc8ed83c 100644 --- a/dwds/test/instances/record_inspection_test.dart +++ b/dwds/test/instances/record_inspection_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = false; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/record_type_inspection_canary_test.dart b/dwds/test/instances/record_type_inspection_canary_test.dart index 8a76b2d1d..50b8e7420 100644 --- a/dwds/test/instances/record_type_inspection_canary_test.dart +++ b/dwds/test/instances/record_type_inspection_canary_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = true; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/record_type_inspection_test.dart b/dwds/test/instances/record_type_inspection_test.dart index 70bdceeae..abf57d6dc 100644 --- a/dwds/test/instances/record_type_inspection_test.dart +++ b/dwds/test/instances/record_type_inspection_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = false; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/type_inspection_canary_test.dart b/dwds/test/instances/type_inspection_canary_test.dart index b3fb87621..65eaf0c29 100644 --- a/dwds/test/instances/type_inspection_canary_test.dart +++ b/dwds/test/instances/type_inspection_canary_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = true; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures, diff --git a/dwds/test/instances/type_inspection_test.dart b/dwds/test/instances/type_inspection_test.dart index cf746daee..4045528fa 100644 --- a/dwds/test/instances/type_inspection_test.dart +++ b/dwds/test/instances/type_inspection_test.dart @@ -17,7 +17,7 @@ void main() { final debug = false; final canaryFeatures = false; - group('canaryFeatures: $canaryFeatures |', () { + group('canary: $canaryFeatures |', () { final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: canaryFeatures,