| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GeometryPrinters_h | 5 #ifndef GeometryPrinters_h |
| 6 #define GeometryPrinters_h | 6 #define GeometryPrinters_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatRoundedRect.h" | 8 #include "platform/geometry/FloatRoundedRect.h" |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class DoublePoint; |
| 14 class DoubleRect; |
| 15 class DoubleSize; |
| 13 class FloatBox; | 16 class FloatBox; |
| 14 class FloatPoint; | 17 class FloatPoint; |
| 15 class FloatPoint3D; | 18 class FloatPoint3D; |
| 16 class FloatQuad; | 19 class FloatQuad; |
| 17 class FloatRect; | 20 class FloatRect; |
| 18 class FloatSize; | 21 class FloatSize; |
| 19 class IntPoint; | 22 class IntPoint; |
| 20 class IntRect; | 23 class IntRect; |
| 21 class IntSize; | 24 class IntSize; |
| 22 class LayoutPoint; | 25 class LayoutPoint; |
| 23 class LayoutRect; | 26 class LayoutRect; |
| 24 class LayoutSize; | 27 class LayoutSize; |
| 25 | 28 |
| 26 // GTest print support for geometry classes. | 29 // GTest print support for geometry classes. |
| 27 // | 30 // |
| 28 // To avoid ODR violations, these should also be declared in the respective | 31 // To avoid ODR violations, these should also be declared in the respective |
| 29 // headers defining these types. This is required because otherwise a template | 32 // headers defining these types. This is required because otherwise a template |
| 30 // instantiation may be instantiated differently, depending on whether this | 33 // instantiation may be instantiated differently, depending on whether this |
| 31 // declaration is found. | 34 // declaration is found. |
| 32 // | 35 // |
| 33 // As a result, it is not necessary to include this file in tests in order to | 36 // As a result, it is not necessary to include this file in tests in order to |
| 34 // use these printers. If, however, you get a link error about these symbols, | 37 // use these printers. If, however, you get a link error about these symbols, |
| 35 // you need to make sure the blink_platform_test_support target is linked in | 38 // you need to make sure the blink_platform_test_support target is linked in |
| 36 // your unit test binary. | 39 // your unit test binary. |
| 40 void PrintTo(const DoublePoint&, std::ostream*); |
| 41 void PrintTo(const DoubleRect&, std::ostream*); |
| 42 void PrintTo(const DoubleSize&, std::ostream*); |
| 37 void PrintTo(const FloatBox&, std::ostream*); | 43 void PrintTo(const FloatBox&, std::ostream*); |
| 38 void PrintTo(const FloatPoint&, std::ostream*); | 44 void PrintTo(const FloatPoint&, std::ostream*); |
| 39 void PrintTo(const FloatPoint3D&, std::ostream*); | 45 void PrintTo(const FloatPoint3D&, std::ostream*); |
| 40 void PrintTo(const FloatQuad&, std::ostream*); | 46 void PrintTo(const FloatQuad&, std::ostream*); |
| 41 void PrintTo(const FloatRect&, std::ostream*); | 47 void PrintTo(const FloatRect&, std::ostream*); |
| 42 void PrintTo(const FloatRoundedRect&, std::ostream*); | 48 void PrintTo(const FloatRoundedRect&, std::ostream*); |
| 43 void PrintTo(const FloatRoundedRect::Radii&, std::ostream*); | 49 void PrintTo(const FloatRoundedRect::Radii&, std::ostream*); |
| 44 void PrintTo(const FloatSize&, std::ostream*); | 50 void PrintTo(const FloatSize&, std::ostream*); |
| 45 void PrintTo(const IntPoint&, std::ostream*); | 51 void PrintTo(const IntPoint&, std::ostream*); |
| 46 void PrintTo(const IntRect&, std::ostream*); | 52 void PrintTo(const IntRect&, std::ostream*); |
| 47 void PrintTo(const IntSize&, std::ostream*); | 53 void PrintTo(const IntSize&, std::ostream*); |
| 48 void PrintTo(const LayoutPoint&, std::ostream*); | 54 void PrintTo(const LayoutPoint&, std::ostream*); |
| 49 void PrintTo(const LayoutRect&, std::ostream*); | 55 void PrintTo(const LayoutRect&, std::ostream*); |
| 50 void PrintTo(const LayoutSize&, std::ostream*); | 56 void PrintTo(const LayoutSize&, std::ostream*); |
| 51 | 57 |
| 52 } // namespace blink | 58 } // namespace blink |
| 53 | 59 |
| 54 #endif // GeometryPrinters_h | 60 #endif // GeometryPrinters_h |
| OLD | NEW |