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" | 9 #include "mojo/public/bindings/allocation_scope.h" |
| 10 #include "mojo/public/bindings/tests/sample_service.mojom.h" |
10 #include "mojo/public/environment/environment.h" | 11 #include "mojo/public/environment/environment.h" |
11 #include "mojom/sample_service.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 | |
21 static_cast<int32_t>(bar.beta()) << 8 | | 21 static_cast<int32_t>(bar.beta()) << 8 | |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 EXPECT_EQ(15, full.point().y()); | 341 EXPECT_EQ(15, full.point().y()); |
342 | 342 |
343 EXPECT_EQ(1u, full.shape_masks().size()); | 343 EXPECT_EQ(1u, full.shape_masks().size()); |
344 EXPECT_EQ(1 << imported::SHAPE_RECTANGLE, full.shape_masks()[0]); | 344 EXPECT_EQ(1 << imported::SHAPE_RECTANGLE, full.shape_masks()[0]); |
345 | 345 |
346 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape()); | 346 EXPECT_EQ(imported::SHAPE_CIRCLE, full.thing().shape()); |
347 EXPECT_EQ(imported::COLOR_BLACK, full.thing().color()); | 347 EXPECT_EQ(imported::COLOR_BLACK, full.thing().color()); |
348 } | 348 } |
349 | 349 |
350 } // namespace sample | 350 } // namespace sample |
OLD | NEW |