| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "gtest/gtest.h" |
| 7 #include "mojo/public/cpp/bindings/array.h" | 8 #include "mojo/public/cpp/bindings/array.h" |
| 8 #include "mojo/public/cpp/bindings/formatting.h" | 9 #include "mojo/public/cpp/bindings/formatting.h" |
| 9 #include "mojo/public/cpp/bindings/map.h" | 10 #include "mojo/public/cpp/bindings/map.h" |
| 10 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" | 11 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 namespace test { | 14 namespace test { |
| 15 namespace { | 15 namespace { |
| 16 RectPtr MakeRect(int32_t factor = 1) { | 16 RectPtr MakeRect(int32_t factor = 1) { |
| 17 RectPtr rect(Rect::New()); | 17 RectPtr rect(Rect::New()); |
| 18 rect->x = 1 * factor; | 18 rect->x = 1 * factor; |
| 19 rect->y = 2 * factor; | 19 rect->y = 2 * factor; |
| 20 rect->width = 10 * factor; | 20 rect->width = 10 * factor; |
| 21 rect->height = 20 * factor; | 21 rect->height = 20 * factor; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 EXPECT_EQ( | 95 EXPECT_EQ( |
| 96 "inlined_struct_ptr={x=1, y=2, width=10, height=20}, " | 96 "inlined_struct_ptr={x=1, y=2, width=10, height=20}, " |
| 97 "null_inlined_struct_ptr=null, " | 97 "null_inlined_struct_ptr=null, " |
| 98 "struct_ptr={first={x=2, y=4, width=20, height=40}, second=null}, " | 98 "struct_ptr={first={x=2, y=4, width=20, height=40}, second=null}, " |
| 99 "null_struct_ptr=null", | 99 "null_struct_ptr=null", |
| 100 so.str()); | 100 so.str()); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace test | 103 } // namespace test |
| 104 } // namespace mojo | 104 } // namespace mojo |
| OLD | NEW |