mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
dev: box and unbox 16-bit and 8-bit values
This commit is contained in:
parent
49d52f5d9a
commit
ee79a311f9
4 changed files with 299 additions and 12 deletions
|
@ -3317,6 +3317,24 @@ fn box_and_unbox_32bit_num() {
|
|||
assert_evals_to!("Box.unbox (Box.box (123u32))", 123, u32)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn box_and_unbox_16bit_num() {
|
||||
assert_evals_to!("Box.unbox (Box.box (123u16))", 123, u16)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn box_and_unbox_8bit_num() {
|
||||
assert_evals_to!("Box.unbox (Box.box (123u8))", 123, u8)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn box_and_unbox_1bit_num() {
|
||||
assert_evals_to!("Box.unbox (Box.box (Bool.true))", true, bool)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn box_and_unbox_record() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue