mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
reimplement RocList
and RocStr
This commit is contained in:
parent
16e568be76
commit
788c8a6af2
19 changed files with 680 additions and 792 deletions
|
@ -1468,7 +1468,7 @@ fn rbtree_insert() {
|
|||
show (insert 0 {} Empty)
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice("Node".as_bytes()),
|
||||
RocStr::from("Node"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -1535,7 +1535,7 @@ fn rbtree_layout_issue() {
|
|||
main = show (balance Red zero zero Empty)
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice("Empty".as_bytes()),
|
||||
RocStr::from("Empty"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -1589,7 +1589,7 @@ fn rbtree_balance_mono_problem() {
|
|||
main = show (balance Red 0 0 Empty Empty)
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice("Empty".as_bytes()),
|
||||
RocStr::from("Empty"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -2382,7 +2382,7 @@ fn build_then_apply_closure() {
|
|||
(\_ -> x) {}
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"long string that is malloced"),
|
||||
RocStr::from("long string that is malloced"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -2556,7 +2556,7 @@ fn module_thunk_is_function() {
|
|||
helper = Str.concat
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"foobar"),
|
||||
RocStr::from("foobar"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -2580,7 +2580,7 @@ fn hit_unresolved_type_variable() {
|
|||
\input -> input
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"B"),
|
||||
RocStr::from("B"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -2648,7 +2648,7 @@ fn mirror_llvm_alignment_padding() {
|
|||
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"pass\npass"),
|
||||
RocStr::from("pass\npass"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -2911,7 +2911,7 @@ fn mix_function_and_closure() {
|
|||
(if 1 == 1 then foo else (bar "nope nope nope")) "hello world"
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"hello world"),
|
||||
RocStr::from("hello world"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -2936,7 +2936,7 @@ fn mix_function_and_closure_level_of_indirection() {
|
|||
f "hello world"
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"hello world"),
|
||||
RocStr::from("hello world"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3012,7 +3012,7 @@ fn do_pass_bool_byte_closure_layout() {
|
|||
main = [test1, test2, test3, test4] |> Str.joinWith ", "
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"PASS, PASS, PASS, PASS"),
|
||||
RocStr::from("PASS, PASS, PASS, PASS"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3037,7 +3037,7 @@ fn nested_rigid_list() {
|
|||
_ -> "hello world"
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"hello world"),
|
||||
RocStr::from("hello world"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3064,7 +3064,7 @@ fn nested_rigid_alias() {
|
|||
_ -> "hello world"
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"hello world"),
|
||||
RocStr::from("hello world"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3089,7 +3089,7 @@ fn nested_rigid_tag_union() {
|
|||
_ -> "hello world"
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"hello world"),
|
||||
RocStr::from("hello world"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3117,7 +3117,7 @@ fn call_that_needs_closure_parameter() {
|
|||
runTest manyAuxTest
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"FAIL"),
|
||||
RocStr::from("FAIL"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3138,7 +3138,7 @@ fn alias_defined_out_of_order() {
|
|||
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"foo"),
|
||||
RocStr::from("foo"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
@ -3184,7 +3184,7 @@ fn recursively_build_effect() {
|
|||
e2 {}
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"Hello, World!"),
|
||||
RocStr::from("Hello, World!"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue