mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge branch 'main' into str-withprefix
This commit is contained in:
commit
aef15ac1e8
57 changed files with 1388 additions and 631 deletions
|
@ -1931,6 +1931,34 @@ fn when_on_strings() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn with_capacity() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
Str.withCapacity 10
|
||||
"#
|
||||
),
|
||||
RocStr::from(""),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn with_capacity_concat() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
Str.withCapacity 10 |> Str.concat "Forty-two"
|
||||
"#
|
||||
),
|
||||
RocStr::from("Forty-two"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn str_with_prefix() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue