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 291d701 commit 24d5443Copy full SHA for 24d5443
uefi-raw/src/net.rs
@@ -382,14 +382,6 @@ mod tests {
382
}
383
384
385
- /// Tests that all bytes are initialized and that the Debug print doesn't
386
- /// produce errors, when Miri executes this.
387
- #[test]
388
- fn test_ip_address_debug_memory_safe() {
389
- let uefi_addr = IpAddress::new_v6(TEST_IPV6);
390
- std::eprintln!("{uefi_addr:#?}");
391
- }
392
-
393
/// Tests the expected flow of types in a higher-level UEFI API.
394
#[test]
395
fn test_uefi_flow() {
@@ -430,4 +422,16 @@ mod tests {
430
422
let expected = [42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42];
431
423
assert_eq!(ipv6_addr.octets(), expected);
432
424
425
+
426
+ #[test]
427
+ fn test_efi_ip_address_abi() {
428
+ #[repr(C, packed)]
429
+ struct PackedHelper<T>(T);
+ assert_eq!(align_of::<IpAddress>(), 4);
+ assert_eq!(size_of::<IpAddress>(), 16);
433
434
+ assert_eq!(align_of::<PackedHelper<IpAddress>>(), 1);
435
+ assert_eq!(size_of::<PackedHelper<IpAddress>>(), 16);
436
+ }
437
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments