OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "mojo/public/cpp/bindings/lib/fixed_buffer.h" | 5 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" |
6 #include "mojo/public/cpp/environment/environment.h" | 6 #include "mojo/public/cpp/environment/environment.h" |
7 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" | 7 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 void CheckRect(const Rect& rect, int32_t factor = 1) { | 23 void CheckRect(const Rect& rect, int32_t factor = 1) { |
24 EXPECT_EQ(1 * factor, rect.x); | 24 EXPECT_EQ(1 * factor, rect.x); |
25 EXPECT_EQ(2 * factor, rect.y); | 25 EXPECT_EQ(2 * factor, rect.y); |
26 EXPECT_EQ(10 * factor, rect.width); | 26 EXPECT_EQ(10 * factor, rect.width); |
27 EXPECT_EQ(20 * factor, rect.height); | 27 EXPECT_EQ(20 * factor, rect.height); |
28 } | 28 } |
29 | 29 |
30 class StructTest : public testing::Test { | 30 class StructTest : public testing::Test { |
31 public: | 31 public: |
32 virtual ~StructTest() {} | 32 ~StructTest() override {} |
33 | 33 |
34 private: | 34 private: |
35 Environment env_; | 35 Environment env_; |
36 }; | 36 }; |
37 | 37 |
38 } // namespace | 38 } // namespace |
39 | 39 |
40 TEST_F(StructTest, Rect) { | 40 TEST_F(StructTest, Rect) { |
41 RectPtr rect; | 41 RectPtr rect; |
42 EXPECT_TRUE(rect.is_null()); | 42 EXPECT_TRUE(rect.is_null()); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 NamedRegionPtr region2; | 169 NamedRegionPtr region2; |
170 Deserialize_(data, ®ion2); | 170 Deserialize_(data, ®ion2); |
171 | 171 |
172 EXPECT_TRUE(region2->name.is_null()); | 172 EXPECT_TRUE(region2->name.is_null()); |
173 EXPECT_TRUE(region2->rects.is_null()); | 173 EXPECT_TRUE(region2->rects.is_null()); |
174 } | 174 } |
175 | 175 |
176 } // namespace test | 176 } // namespace test |
177 } // namespace mojo | 177 } // namespace mojo |
OLD | NEW |