Flutter Engine
The Flutter Engine
gfx_util.h
Go to the documentation of this file.
1// Copyright 2014 The Chromium 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 UI_GFX_TEST_GFX_UTIL_H_
6#define UI_GFX_TEST_GFX_UTIL_H_
7
8#include <iosfwd>
9#include <string>
10
11#include "gtest/gtest.h"
12
13namespace gfx {
14
15class AxisTransform2d;
16class BoxF;
17class PointF;
18class RectF;
19class SizeF;
20
21#define EXPECT_AXIS_TRANSFORM2D_EQ(a, b) \
22 EXPECT_PRED_FORMAT2(::gfx::AssertAxisTransform2dFloatEqual, a, b)
23
24::testing::AssertionResult AssertAxisTransform2dFloatEqual(
25 const char* lhs_expr,
26 const char* rhs_expr,
27 const AxisTransform2d& lhs,
28 const AxisTransform2d& rhs);
29
30#define EXPECT_BOXF_EQ(a, b) \
31 EXPECT_PRED_FORMAT2(::gfx::AssertBoxFloatEqual, a, b)
32
33::testing::AssertionResult AssertBoxFloatEqual(const char* lhs_expr,
34 const char* rhs_expr,
35 const BoxF& lhs,
36 const BoxF& rhs);
37
38#define EXPECT_POINTF_EQ(a, b) \
39 EXPECT_PRED_FORMAT2(::gfx::AssertPointFloatEqual, a, b)
40
41::testing::AssertionResult AssertPointFloatEqual(const char* lhs_expr,
42 const char* rhs_expr,
43 const PointF& lhs,
44 const PointF& rhs);
45
46#define EXPECT_RECTF_EQ(a, b) \
47 EXPECT_PRED_FORMAT2(::gfx::AssertRectFloatEqual, a, b)
48
49::testing::AssertionResult AssertRectFloatEqual(const char* lhs_expr,
50 const char* rhs_expr,
51 const RectF& lhs,
52 const RectF& rhs);
53
54#define EXPECT_SIZEF_EQ(a, b) \
55 EXPECT_PRED_FORMAT2(::gfx::AssertSizeFFloatEqual, a, b)
56
57::testing::AssertionResult AssertSizeFFloatEqual(const char* lhs_expr,
58 const char* rhs_expr,
59 const SizeF& lhs,
60 const SizeF& rhs);
61} // namespace gfx
62
63#endif // UI_GFX_TEST_GFX_UTIL_H_
Definition: insets.cc:10
::testing::AssertionResult AssertRectFloatEqual(const char *lhs_expr, const char *rhs_expr, const RectF &lhs, const RectF &rhs)
Definition: gfx_util.cc:46
::testing::AssertionResult AssertPointFloatEqual(const char *lhs_expr, const char *rhs_expr, const PointF &lhs, const PointF &rhs)
Definition: gfx_util.cc:33
::testing::AssertionResult AssertAxisTransform2dFloatEqual(const char *lhs_expr, const char *rhs_expr, const AxisTransform2d &lhs, const AxisTransform2d &rhs)
::testing::AssertionResult AssertSizeFFloatEqual(const char *lhs_expr, const char *rhs_expr, const SizeF &lhs, const SizeF &rhs)
Definition: gfx_util.cc:61
::testing::AssertionResult AssertBoxFloatEqual(const char *lhs_expr, const char *rhs_expr, const BoxF &lhs, const BoxF &rhs)