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
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@Skip(
'This file is skipped due to a cross-import that needs to be fixed. Tracked in https://github.com/flutter/flutter/issues/177028.',
)
// This file is run as part of a reduced test set in CI on Mac and Windows
// machines.
@Tags(<String>['reduced-test-set'])
library;

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:material_ui/material_ui.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:material_ui/material_ui.dart';

import '../widgets/feedback_tester.dart';
import '../test/semantics_tester.dart';
import 'feedback_tester.dart';
import 'semantics_tester.dart';

Finder findRenderChipElement() {
return find.byElementPredicate((Element e) => '${e.renderObject.runtimeType}' == '_RenderChip');
Expand Down Expand Up @@ -203,9 +200,9 @@ PaintPattern uniqueRipplePattern(Offset expectedCenter, double expectedRadius) {
if (offsetsAreClose(center, expectedCenter) && radiiAreClose(radius, expectedRadius)) {
return true;
}
throw '''
throw Exception('''
Expected: center == $expectedCenter, radius == $expectedRadius
Found: center == $center radius == $radius''';
Found: center == $center radius == $radius''');
Comment on lines +203 to +205

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The multiline string literal preserves the leading whitespace (14 spaces) on each line, which will make the exception message heavily indented and hard to read in test failure logs.

Using adjacent string literals with explicit \n avoids accidental leading whitespace while keeping the code clean and readable.

    throw Exception(
      'Expected: center == $expectedCenter, radius == $expectedRadius\n'
      'Found: center == $center radius == $radius',
    );

});
}

Expand Down
Loading