Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 #include "ui/gfx/geometry/test/rect_test_util.h" | |
| 6 | |
| 7 namespace gfx { | |
| 8 namespace test { | |
| 9 | |
| 10 testing::AssertionResult RectContains(const gfx::Rect& outer_rect, | |
| 11 const gfx::Rect& inner_rect) { | |
| 12 if (outer_rect.Contains(inner_rect)) { | |
| 13 return testing::AssertionSuccess() | |
|
sky
2017/02/17 16:44:13
Is it really typical to log information about the
bruthig
2017/02/17 16:49:17
The success logging will be used if it fails an (E
| |
| 14 << "outer_rect (" << outer_rect.ToString() | |
| 15 << ") does contain inner_rect (" << inner_rect.ToString() << ")"; | |
| 16 } | |
| 17 return testing::AssertionFailure() << "outer_rect (" << outer_rect.ToString() | |
| 18 << ") does not contain inner_rect (" | |
| 19 << inner_rect.ToString() << ")"; | |
| 20 } | |
| 21 | |
| 22 } // namespace test | |
| 23 } // namespace gfx | |
| OLD | NEW |