Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Side by Side Diff: mojo/public/interfaces/bindings/tests/struct_with_traits.mojom

Issue 2179273002: Mojo C++ bindings: support mapping T and T? differently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 module mojo.test; 5 module mojo.test;
6 6
7 // TODO(yzshen): Rename *WithTraits* types to something more readable. 7 // TODO(yzshen): Rename *WithTraits* types to something more readable.
8 8
9 struct NestedStructWithTraits { 9 struct NestedStructWithTraits {
10 int32 value; 10 int32 value;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 struct MoveOnlyStructWithTraits { 42 struct MoveOnlyStructWithTraits {
43 handle f_handle; 43 handle f_handle;
44 }; 44 };
45 45
46 // The custom type for MoveOnlyStructWithTraits is not clonable. Test that 46 // The custom type for MoveOnlyStructWithTraits is not clonable. Test that
47 // this container can compile as long as Clone() is not used. 47 // this container can compile as long as Clone() is not used.
48 struct MoveOnlyStructWithTraitsContainer { 48 struct MoveOnlyStructWithTraitsContainer {
49 MoveOnlyStructWithTraits f_struct; 49 MoveOnlyStructWithTraits f_struct;
50 }; 50 };
51 51
52 struct StructWithTraitsForUniquePtrTest { 52 struct StructWithTraitsForUniquePtr {
53 int32 f_int32; 53 int32 f_int32;
54 }; 54 };
55 55
56 interface TraitsTestService { 56 interface TraitsTestService {
57 EchoStructWithTraits(StructWithTraits s) => (StructWithTraits passed); 57 EchoStructWithTraits(StructWithTraits s) => (StructWithTraits passed);
58 58
59 EchoTrivialStructWithTraits(TrivialStructWithTraits s) => 59 EchoTrivialStructWithTraits(TrivialStructWithTraits s) =>
60 (TrivialStructWithTraits passed); 60 (TrivialStructWithTraits passed);
61 61
62 EchoMoveOnlyStructWithTraits(MoveOnlyStructWithTraits s) => 62 EchoMoveOnlyStructWithTraits(MoveOnlyStructWithTraits s) =>
63 (MoveOnlyStructWithTraits passed); 63 (MoveOnlyStructWithTraits passed);
64 64
65 EchoNullableMoveOnlyStructWithTraits(MoveOnlyStructWithTraits? s) =>
66 (MoveOnlyStructWithTraits? passed);
67
65 EchoEnumWithTraits(EnumWithTraits e) => (EnumWithTraits passed); 68 EchoEnumWithTraits(EnumWithTraits e) => (EnumWithTraits passed);
66 69
67 EchoStructWithTraitsForUniquePtrTest(StructWithTraitsForUniquePtrTest e) => ( 70 EchoStructWithTraitsForUniquePtr(StructWithTraitsForUniquePtr e) => (
68 StructWithTraitsForUniquePtrTest passed); 71 StructWithTraitsForUniquePtr passed);
72
73 EchoNullableStructWithTraitsForUniquePtr(StructWithTraitsForUniquePtr? e) => (
74 StructWithTraitsForUniquePtr? passed);
69 }; 75 };
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h ('k') | mojo/public/tools/bindings/generate_type_mappings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698