mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-25 00:02:22 +00:00
13 lines
251 B
Rust
13 lines
251 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);
|
||
|
}
|