Skip to content

Commit

Permalink
Update pattern test to account for new DDC JS variable naming
Browse files Browse the repository at this point in the history
A bug recently uncovered in DDC required renaming some variables (primarily around patterns) to avoid declarations from shadowing each other incorrectly. 'a' is now 'a$' as it is the second case that declares a Dart variable named 'a'.
  • Loading branch information
biggs0125 authored Dec 13, 2024
1 parent ab620d1 commit a3a263c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dwds/test/instances/common/patterns_inspection_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ void runTests({

expect(await getFrameVariables(frame), {
'obj': matchListInstance(type: 'Object'),
'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14),
// 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

0 comments on commit a3a263c

Please sign in to comment.