Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions dwds/test/instances/common/patterns_inspection_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'package:test/test.dart';
import 'package:test_common/logging.dart';
import 'package:test_common/test_sdk_configuration.dart';
import 'package:test_common/utilities.dart';
import 'package:vm_service/vm_service.dart';

import '../../fixtures/context.dart';
Expand Down Expand Up @@ -96,11 +97,24 @@ void runTests({
await onBreakPoint('testPatternCase2', (event) async {
final frame = event.topFrame!;

expect(await getFrameVariables(frame), {
'obj': matchListInstance(type: 'Object'),
'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14),
});
if (dartSdkIsAtLeast('3.7.0-246.0.dev')) {
expect(await getFrameVariables(frame), {
'obj': matchListInstance(type: 'Object'),
// Renamed to avoid shadowing variables from previous case.
'a\$':
matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
'n\$':
matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14),
});
} else {
expect(await getFrameVariables(frame), {
'obj': matchListInstance(type: 'Object'),
// Renamed to avoid shadowing variables from previous case.
'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
'n':
matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14),
});
}
});
});

Expand Down
Loading