| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <ostream> | 6 #include <ostream> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "mojo/public/bindings/allocation_scope.h" | |
| 10 #include "mojo/public/bindings/tests/sample_service.mojom.h" | 9 #include "mojo/public/bindings/tests/sample_service.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/allocation_scope.h" |
| 11 #include "mojo/public/cpp/environment/environment.h" | 11 #include "mojo/public/cpp/environment/environment.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 | 15 |
| 16 template <> | 16 template <> |
| 17 class TypeConverter<sample::Bar, int32_t> { | 17 class TypeConverter<sample::Bar, int32_t> { |
| 18 public: | 18 public: |
| 19 static int32_t ConvertTo(const sample::Bar& bar) { | 19 static int32_t ConvertTo(const sample::Bar& bar) { |
| 20 return static_cast<int32_t>(bar.alpha()) << 16 | | 20 return static_cast<int32_t>(bar.alpha()) << 16 | |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 346 |
| 347 EXPECT_EQ(1u, full.shape_masks().size()); | 347 EXPECT_EQ(1u, full.shape_masks().size()); |
| 348 EXPECT_EQ(1 << imported::SHAPE_RECTANGLE, full.shape_masks()[0]); | 348 EXPECT_EQ(1 << imported::SHAPE_RECTANGLE, full.shape_masks()[0]); |
| 349 | 349 |
| 350 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape()); | 350 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape()); |
| 351 EXPECT_EQ(imported::COLOR_BLACK, full.thing().color()); | 351 EXPECT_EQ(imported::COLOR_BLACK, full.thing().color()); |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace | 354 } // namespace |
| 355 } // namespace sample | 355 } // namespace sample |
| OLD | NEW |