We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b7392c commit 1f7cd1bCopy full SHA for 1f7cd1b
uefi-raw/src/net.rs
@@ -387,14 +387,6 @@ mod tests {
387
}
388
389
390
- /// Tests that all bytes are initialized and that the Debug print doesn't
391
- /// produce errors, when Miri executes this.
392
- #[test]
393
- fn test_ip_address_debug_memory_safe() {
394
- let uefi_addr = IpAddress::new_v6(TEST_IPV6);
395
- std::eprintln!("{uefi_addr:#?}");
396
- }
397
-
398
/// Tests the expected flow of types in a higher-level UEFI API.
399
#[test]
400
fn test_uefi_flow() {
@@ -435,4 +427,16 @@ mod tests {
435
427
let expected = [42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42];
436
428
assert_eq!(ipv6_addr.octets(), expected);
437
429
430
+
431
+ #[test]
432
+ fn test_efi_ip_address_abi() {
433
+ #[repr(C, packed)]
434
+ struct PackedHelper<T>(T);
+ assert_eq!(align_of::<IpAddress>(), 4);
+ assert_eq!(size_of::<IpAddress>(), 16);
438
439
+ assert_eq!(align_of::<PackedHelper<IpAddress>>(), 1);
440
+ assert_eq!(size_of::<PackedHelper<IpAddress>>(), 16);
441
+ }
442
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments