mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Remove scalars and graphemes from Str
This commit is contained in:
parent
65738acb26
commit
b48fa0698a
26 changed files with 140 additions and 12721 deletions
|
@ -3158,7 +3158,7 @@ fn list_find() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is
|
||||
when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is
|
||||
Ok v -> v
|
||||
Err _ -> "not found"
|
||||
"#
|
||||
|
@ -3170,7 +3170,7 @@ fn list_find() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is
|
||||
when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is
|
||||
Ok v -> v
|
||||
Err _ -> "not found"
|
||||
"#
|
||||
|
@ -3186,7 +3186,7 @@ fn list_find_not_found() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> "not found"
|
||||
"#
|
||||
|
@ -3198,7 +3198,7 @@ fn list_find_not_found() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> "not found"
|
||||
"#
|
||||
|
@ -3214,7 +3214,7 @@ fn list_find_empty_typed_list() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findFirst [] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findFirst [] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> "not found"
|
||||
"#
|
||||
|
@ -3226,7 +3226,7 @@ fn list_find_empty_typed_list() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findLast [] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findLast [] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> "not found"
|
||||
"#
|
||||
|
@ -3270,7 +3270,7 @@ fn list_find_index() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is
|
||||
when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is
|
||||
Ok v -> v
|
||||
Err _ -> 999
|
||||
"#
|
||||
|
@ -3282,7 +3282,7 @@ fn list_find_index() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findLastIndex ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is
|
||||
when List.findLastIndex ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is
|
||||
Ok v -> v
|
||||
Err _ -> 999
|
||||
"#
|
||||
|
@ -3298,7 +3298,7 @@ fn list_find_index_not_found() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> 999
|
||||
"#
|
||||
|
@ -3310,7 +3310,7 @@ fn list_find_index_not_found() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when List.findLastIndex ["a", "bc", "def"] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findLastIndex ["a", "bc", "def"] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> 999
|
||||
"#
|
||||
|
@ -3326,7 +3326,7 @@ fn list_find_index_empty_typed_list() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r"
|
||||
when List.findFirstIndex [] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findFirstIndex [] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> 999
|
||||
"
|
||||
|
@ -3338,7 +3338,7 @@ fn list_find_index_empty_typed_list() {
|
|||
assert_evals_to!(
|
||||
indoc!(
|
||||
r"
|
||||
when List.findLastIndex [] (\s -> Str.countGraphemes s > 5) is
|
||||
when List.findLastIndex [] (\s -> Str.countUtf8Bytes s > 5) is
|
||||
Ok v -> v
|
||||
Err _ -> 999
|
||||
"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue