From 2e196037f5f2cfe64063d1102ca57eeeb02cb005 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Fri, 20 Jan 2017 22:31:41 -0800 Subject: [PATCH] Improve the order of members in the mock_canvas file. (#7573) This will make it easier to understand what this file does. --- .../flutter/test/rendering/mock_canvas.dart | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/flutter/test/rendering/mock_canvas.dart b/packages/flutter/test/rendering/mock_canvas.dart index 904dce7aa2e..150089c8851 100644 --- a/packages/flutter/test/rendering/mock_canvas.dart +++ b/packages/flutter/test/rendering/mock_canvas.dart @@ -6,6 +6,22 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; import 'package:test/test.dart'; +/// Matches [RenderObject]s that paint a display list that matches the canvas +/// calls described by the pattern. +/// +/// To specify the pattern, call the methods on the returned object. For example: +/// +/// ```dart +/// expect(myRenderObject, paints..circle(radius: 10.0)..circle(radius: 20.0)); +/// ``` +/// +/// This particular pattern would verify that the render object `myRenderObject` +/// paints, among other things, two circles of radius 10.0 and 20.0 (in that +/// order). +/// +/// See [PaintPattern] for a discussion of the semantics of paint patterns. +PaintPattern get paints => new _TestRecordingCanvasPatternMatcher(); + /// Signature for [PaintPattern.something] predicate argument. /// /// Used by the [paints] matcher. @@ -121,22 +137,6 @@ abstract class PaintPattern { void something(PaintPatternPredicate predicate); } -/// Matches [RenderObject]s that paint a display list that matches the canvas -/// calls described by the pattern. -/// -/// To specify the pattern, call the methods on the returned object. For example: -/// -/// ```dart -/// expect(myRenderObject, paints..circle(radius: 10.0)..circle(radius: 20.0)); -/// ``` -/// -/// This particular pattern would verify that the render object `myRenderObject` -/// paints, among other things, two circles of radius 10.0 and 20.0 (in that -/// order). -/// -/// See [PaintPattern] for a discussion of the semantics of paint patterns. -PaintPattern get paints => new _TestRecordingCanvasPatternMatcher(); - class _TestRecordingCanvasPatternMatcher extends Matcher implements PaintPattern { final List<_PaintPredicate> _predicates = <_PaintPredicate>[];