Flutter Engine
 
Loading...
Searching...
No Matches
dl_test_mock_path_receiver.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_MOCK_PATH_RECEIVER_H_
6#define FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_MOCK_PATH_RECEIVER_H_
7
8#include "gmock/gmock.h"
9
11
12namespace flutter {
13namespace testing {
14
15MATCHER_P(PointEq, p, "") {
16 *result_listener << "isn't equal to " << p;
17 return arg.GetDistance(p) <= kEhCloseEnough;
18}
19
21 public:
23 MoveTo,
24 (const DlPoint& p2, bool will_be_closed),
25 (override));
26 MOCK_METHOD(void, LineTo, (const DlPoint& p2), (override));
27 MOCK_METHOD(void, QuadTo, (const DlPoint& cp, const DlPoint& p2), (override));
29 ConicTo,
30 (const DlPoint& cp, const DlPoint& p2, DlScalar weight),
31 (override));
33 CubicTo,
34 (const DlPoint& cp1, const DlPoint& cp2, const DlPoint& p2),
35 (override));
36 MOCK_METHOD(void, Close, (), (override));
37};
38
39} // namespace testing
40} // namespace flutter
41
42#endif // FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_MOCK_PATH_RECEIVER_H_
MOCK_METHOD(void, Close,(),(override))
MOCK_METHOD(bool, ConicTo,(const DlPoint &cp, const DlPoint &p2, DlScalar weight),(override))
MOCK_METHOD(void, MoveTo,(const DlPoint &p2, bool will_be_closed),(override))
MOCK_METHOD(void, QuadTo,(const DlPoint &cp, const DlPoint &p2),(override))
MOCK_METHOD(void, CubicTo,(const DlPoint &cp1, const DlPoint &cp2, const DlPoint &p2),(override))
MOCK_METHOD(void, LineTo,(const DlPoint &p2),(override))
Collection of functions to receive path segments from the underlying path representation via the DlPa...
Definition path_source.h:42
virtual void CubicTo(const Point &cp1, const Point &cp2, const Point &p2)=0
virtual void LineTo(const Point &p2)=0
virtual void QuadTo(const Point &cp, const Point &p2)=0
virtual void Close()=0
virtual void MoveTo(const Point &p2, bool will_be_closed)=0
virtual bool ConicTo(const Point &cp, const Point &p2, Scalar weight)
Definition path_source.h:48
impeller::Scalar DlScalar
static constexpr DlScalar kEhCloseEnough