Skip to content

Commit e352744

Browse files
nshahancommit-bot@chromium.org
authored andcommitted
[ddc] Fix failing debugger tests
- Accept the existing output in the golden file as a new baseline. - Copy the golden file for the null safe version of the test and enable running the full golden diff. Fixes: #44025 Change-Id: Ie5b3e7c7689d17fca8a01e970b28fc815a6b9851 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172688 Reviewed-by: Mark Zhou <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]>
1 parent 4320933 commit e352744

File tree

4 files changed

+6755
-2366
lines changed

4 files changed

+6755
-2366
lines changed

tests/dartdevc/debugger/debugger_test.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ main() async {
127127
// Cache blocker is a workaround for:
128128
// https://code.google.com/p/dart/issues/detail?id=11834
129129
var cacheBlocker = new DateTime.now().millisecondsSinceEpoch;
130-
var goldenUrl = '/root_dart/tests/dartdevc_2/debugger/'
130+
var goldenUrl = '/root_dart/tests/dartdevc/debugger/'
131131
'debugger_test_golden.txt?cacheBlock=$cacheBlocker';
132132

133133
String? golden;
@@ -324,7 +324,7 @@ window.ExampleJSClass = function ExampleJSClass(x) {
324324
if (actualStr != golden) {
325325
var helpMessage =
326326
'Debugger output does not match the golden data found in:\n'
327-
'tests/dartdevc_2/debugger/debugger_test_golden.txt\n'
327+
'tests/dartdevc/debugger/debugger_test_golden.txt\n'
328328
'The new golden data is copied to the clipboard when you click on '
329329
'this window.\n'
330330
'Please update the golden file with the following output and review '
@@ -352,12 +352,6 @@ window.ExampleJSClass = function ExampleJSClass(x) {
352352
}
353353
});
354354
}
355-
// TODO(vsm): This comparison appears to be badly broken for several
356-
// reasons:
357-
// (1) The golden file isn't properly read on the bots or locally (see try
358-
// / catch above).
359-
// (2) The actual string appears to vary locally vs on the bots.
360-
// (3) Because of (2), visualizing the diff is difficult.
361-
// expect(actualStr == golden, isTrue);
355+
expect(actualStr == golden, isTrue);
362356
});
363357
}

0 commit comments

Comments
 (0)