|
5 | 5 | import 'package:test/test.dart';
|
6 | 6 | import 'package:test_common/logging.dart';
|
7 | 7 | import 'package:test_common/test_sdk_configuration.dart';
|
| 8 | +import 'package:test_common/utilities.dart'; |
8 | 9 | import 'package:vm_service/vm_service.dart';
|
9 | 10 |
|
10 | 11 | import '../../fixtures/context.dart';
|
@@ -96,11 +97,24 @@ void runTests({
|
96 | 97 | await onBreakPoint('testPatternCase2', (event) async {
|
97 | 98 | final frame = event.topFrame!;
|
98 | 99 |
|
99 |
| - expect(await getFrameVariables(frame), { |
100 |
| - 'obj': matchListInstance(type: 'Object'), |
101 |
| - 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), |
102 |
| - 'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14), |
103 |
| - }); |
| 100 | + if (dartSdkIsAtLeast('3.7.0-246.0.dev')) { |
| 101 | + expect(await getFrameVariables(frame), { |
| 102 | + 'obj': matchListInstance(type: 'Object'), |
| 103 | + // Renamed to avoid shadowing variables from previous case. |
| 104 | + 'a\$': |
| 105 | + matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), |
| 106 | + 'n\$': |
| 107 | + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14), |
| 108 | + }); |
| 109 | + } else { |
| 110 | + expect(await getFrameVariables(frame), { |
| 111 | + 'obj': matchListInstance(type: 'Object'), |
| 112 | + // Renamed to avoid shadowing variables from previous case. |
| 113 | + 'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'), |
| 114 | + 'n': |
| 115 | + matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14), |
| 116 | + }); |
| 117 | + } |
104 | 118 | });
|
105 | 119 | });
|
106 | 120 |
|
|
0 commit comments