| // Copyright 2025 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| success("AliasOfBool") { |
| value = AliasedBool{ |
| value: true, |
| }, |
| bytes = { |
| v2 = [ |
| 0x01, padding:7, |
| ], |
| }, |
| } |
| |
| success("AliasOfInteger") { |
| value = AliasedUint64{ |
| value: 1157442765157568528, |
| }, |
| bytes = { |
| v2 = [ |
| 0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x10, |
| ], |
| }, |
| } |
| |
| success("AliasOfFloat64") { |
| value = AliasedFloat64{ |
| value: 1.618033988749895, |
| }, |
| bytes = { |
| v2 = [ |
| 0xa8, 0xf4, 0x97, 0x9b, 0x77, 0xe3, 0xf9, 0x3f, |
| ], |
| }, |
| } |
| |
| success("AliasOfString") { |
| value = AliasedString{ |
| value: "ab", |
| }, |
| bytes = { |
| v2 = [ |
| num(2):8, // count |
| repeat(0xFF):8, // presence |
| 0x61, 0x62, // length_2_string |
| padding:6, |
| ], |
| }, |
| } |
| |
| success("AliasOfStruct") { |
| value = AliasedStruct{ |
| value: AnotherEmptyStruct{}, |
| }, |
| bytes = { |
| v2 = [ |
| 0x00, padding:7, |
| ], |
| }, |
| } |