| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 EchoEnumWithTraits(EnumWithTraits e) => (EnumWithTraits passed); | 74 EchoEnumWithTraits(EnumWithTraits e) => (EnumWithTraits passed); |
| 75 | 75 |
| 76 EchoStructWithTraitsForUniquePtr(StructWithTraitsForUniquePtr e) => ( | 76 EchoStructWithTraitsForUniquePtr(StructWithTraitsForUniquePtr e) => ( |
| 77 StructWithTraitsForUniquePtr passed); | 77 StructWithTraitsForUniquePtr passed); |
| 78 | 78 |
| 79 EchoNullableStructWithTraitsForUniquePtr(StructWithTraitsForUniquePtr? e) => ( | 79 EchoNullableStructWithTraitsForUniquePtr(StructWithTraitsForUniquePtr? e) => ( |
| 80 StructWithTraitsForUniquePtr? passed); | 80 StructWithTraitsForUniquePtr? passed); |
| 81 | 81 |
| 82 EchoUnionWithTraits(UnionWithTraits u) => (UnionWithTraits passed); | 82 EchoUnionWithTraits(UnionWithTraits u) => (UnionWithTraits passed); |
| 83 }; | 83 }; |
| 84 |
| 85 // Test that specifying default value for a typemapped enum field works. |
| 86 struct EnumWithTraitsContainer { |
| 87 EnumWithTraits f_field = EnumWithTraits.VALUE_1; |
| 88 }; |
| 89 |
| OLD | NEW |