mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Merge remote-tracking branch 'origin/trunk' into list-replace
This commit is contained in:
commit
b802d681a3
90 changed files with 5667 additions and 313 deletions
|
@ -357,6 +357,66 @@ fn u8_hex_int_alias() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn character_literal() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
x = 'A'
|
||||
|
||||
x
|
||||
"#
|
||||
),
|
||||
65,
|
||||
u32
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn character_literal_back_slash() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
x = '\\'
|
||||
|
||||
x
|
||||
"#
|
||||
),
|
||||
92,
|
||||
u32
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn character_literal_single_quote() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
x = '\''
|
||||
|
||||
x
|
||||
"#
|
||||
),
|
||||
39,
|
||||
u32
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn character_literal_new_line() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
x = '\n'
|
||||
|
||||
x
|
||||
"#
|
||||
),
|
||||
10,
|
||||
u32
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn dec_float_alias() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue