1
0
Fork 0
firefox/third_party/rust/bytemuck/tests/array_tests.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

12 lines
263 B
Rust

#[test]
pub fn test_cast_array() {
let x = [0u32, 1u32, 2u32];
let _: [u16; 6] = bytemuck::cast(x);
}
#[cfg(feature = "min_const_generics")]
#[test]
pub fn test_cast_long_array() {
let x = [0u32; 65];
let _: [u16; 130] = bytemuck::cast(x);
}