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 <string.h> | 5 #include <string.h> |
| 6 |
6 #include <type_traits> | 7 #include <type_traits> |
7 | 8 |
| 9 #include "gtest/gtest.h" |
8 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" | 10 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" |
9 #include "mojo/public/cpp/bindings/lib/validation_errors.h" | 11 #include "mojo/public/cpp/bindings/lib/validation_errors.h" |
10 #include "mojo/public/cpp/system/message_pipe.h" | 12 #include "mojo/public/cpp/system/message_pipe.h" |
11 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" | 13 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | |
13 | 14 |
14 namespace mojo { | 15 namespace mojo { |
15 namespace test { | 16 namespace test { |
16 namespace { | 17 namespace { |
17 | 18 |
18 static_assert(std::is_same<std::underlying_type<ScopedConstants::EType>::type, | 19 static_assert(std::is_same<std::underlying_type<ScopedConstants::EType>::type, |
19 int32_t>::value, | 20 int32_t>::value, |
20 "The underlying type of mojom generated enums must be int32_t."); | 21 "The underlying type of mojom generated enums must be int32_t."); |
21 | 22 |
22 RectPtr MakeRect(int32_t factor = 1) { | 23 RectPtr MakeRect(int32_t factor = 1) { |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 | 450 |
450 MultiVersionStructV0Ptr output = | 451 MultiVersionStructV0Ptr output = |
451 SerializeAndDeserialize<MultiVersionStructV0Ptr>(input.Pass()); | 452 SerializeAndDeserialize<MultiVersionStructV0Ptr>(input.Pass()); |
452 EXPECT_TRUE(output); | 453 EXPECT_TRUE(output); |
453 EXPECT_TRUE(output->Equals(*expected_output)); | 454 EXPECT_TRUE(output->Equals(*expected_output)); |
454 } | 455 } |
455 } | 456 } |
456 | 457 |
457 } // namespace test | 458 } // namespace test |
458 } // namespace mojo | 459 } // namespace mojo |
OLD | NEW |