Skip to content

Commit 3b7eb26

Browse files
MarkzipanCommit Queue
authored andcommitted
[test] Fixing hot reload suite diff checking.
Should resolve flaky cross-platform diffs Change-Id: Ic496829ea984d049f8fe984e614aaf4fb41c283c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402941 Commit-Queue: Mark Zhou <[email protected]> Auto-Submit: Mark Zhou <[email protected]> Reviewed-by: Nate Biggs <[email protected]> Commit-Queue: Nate Biggs <[email protected]>
1 parent 0e880e8 commit 3b7eb26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/dev_compiler/test/hot_reload_suite.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,10 @@ abstract class HotReloadSuiteRunner {
930930
/// 'diff' can be unstable across platforms around newline offsets.
931931
(String, String) _filterLineDeltas(String diff1, String diff2) {
932932
bool isBlankLineOrDelta(String s) {
933-
return s.trim().isEmpty ||
934-
(s.startsWith('+') || s.startsWith('-')) && s.trim().length == 1;
933+
var trimmed = s.trim();
934+
return trimmed.isEmpty ||
935+
(trimmed.startsWith('+') || trimmed.startsWith('-')) &&
936+
trimmed.length == 1;
935937
}
936938

937939
var diff1Lines = LineSplitter().convert(diff1)

0 commit comments

Comments
 (0)