mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
wasm: update small string tests to expect 12 bytes
This commit is contained in:
parent
4878c701ae
commit
a9e0ff6b4b
1 changed files with 14 additions and 14 deletions
|
@ -270,9 +270,9 @@ use roc_std::{RocList, RocStr};
|
||||||
#[cfg(any(feature = "gen-wasm"))]
|
#[cfg(any(feature = "gen-wasm"))]
|
||||||
fn small_str_literal() {
|
fn small_str_literal() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
"\"JJJJJJJ\"",
|
"\"01234567890\"",
|
||||||
[0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0b1000_0111],
|
[0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x8b],
|
||||||
[u8; 8]
|
[u8; 12]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,8 +311,8 @@ fn small_str_zeroed_literal() {
|
||||||
functionWithReusedSpace True
|
functionWithReusedSpace True
|
||||||
"#
|
"#
|
||||||
),
|
),
|
||||||
[0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0b1000_0001],
|
[0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0b1000_0001],
|
||||||
[u8; 8]
|
[u8; 12]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,18 +328,18 @@ fn long_str_literal() {
|
||||||
#[test]
|
#[test]
|
||||||
fn small_str_concat_empty_first_arg() {
|
fn small_str_concat_empty_first_arg() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
r#"Str.concat "" "JJJJJJJ""#,
|
r#"Str.concat "" "01234567890""#,
|
||||||
[0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0b1000_0111],
|
[0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x8b],
|
||||||
[u8; 8]
|
[u8; 12]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn small_str_concat_empty_second_arg() {
|
fn small_str_concat_empty_second_arg() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
r#"Str.concat "JJJJJJJ" """#,
|
r#"Str.concat "01234567890" """#,
|
||||||
[0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0b1000_0111],
|
[0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x8b],
|
||||||
[u8; 8]
|
[u8; 12]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,9 +355,9 @@ fn small_str_concat_small_to_big() {
|
||||||
#[test]
|
#[test]
|
||||||
fn small_str_concat_small_to_small_staying_small() {
|
fn small_str_concat_small_to_small_staying_small() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
r#"Str.concat "J" "JJJJJJ""#,
|
r#"Str.concat "J" "JJJJJJJJJJJ""#,
|
||||||
[0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0b1000_0111],
|
[0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x8b],
|
||||||
[u8; 8]
|
[u8; 12]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue