mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
add comments
This commit is contained in:
parent
d1c074cefe
commit
e5e6ac79fe
1 changed files with 7 additions and 4 deletions
|
@ -2785,6 +2785,7 @@ fn value_not_exposed_hits_panic() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn mix_function_and_closure() {
|
fn mix_function_and_closure() {
|
||||||
|
// see https://github.com/rtfeldman/roc/pull/1706
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
r#"
|
r#"
|
||||||
|
@ -2809,6 +2810,7 @@ fn mix_function_and_closure() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn mix_function_and_closure_level_of_indirection() {
|
fn mix_function_and_closure_level_of_indirection() {
|
||||||
|
// see https://github.com/rtfeldman/roc/pull/1706
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
r#"
|
r#"
|
||||||
|
@ -2832,6 +2834,7 @@ fn mix_function_and_closure_level_of_indirection() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn do_pass_bool_byte_closure_layout() {
|
fn do_pass_bool_byte_closure_layout() {
|
||||||
|
// see https://github.com/rtfeldman/roc/pull/1706
|
||||||
// the distinction is actually important, dropping that info means some functions just get
|
// the distinction is actually important, dropping that info means some functions just get
|
||||||
// skipped
|
// skipped
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
|
@ -2860,8 +2863,8 @@ fn do_pass_bool_byte_closure_layout() {
|
||||||
|
|
||||||
satisfy : (U8 -> Bool) -> Parser U8
|
satisfy : (U8 -> Bool) -> Parser U8
|
||||||
satisfy = \predicate ->
|
satisfy = \predicate ->
|
||||||
\input ->
|
\input ->
|
||||||
walker = \(Pair u rest), accum ->
|
walker = \(Pair u rest), accum ->
|
||||||
if predicate u then
|
if predicate u then
|
||||||
Stop [ Pair u rest ]
|
Stop [ Pair u rest ]
|
||||||
|
|
||||||
|
@ -2875,7 +2878,7 @@ fn do_pass_bool_byte_closure_layout() {
|
||||||
oneOf : List (Parser a) -> Parser a
|
oneOf : List (Parser a) -> Parser a
|
||||||
oneOf = \parserList ->
|
oneOf = \parserList ->
|
||||||
\input ->
|
\input ->
|
||||||
walker = \p, accum ->
|
walker = \p, accum ->
|
||||||
output = p input
|
output = p input
|
||||||
if List.len output == 1 then
|
if List.len output == 1 then
|
||||||
Stop output
|
Stop output
|
||||||
|
@ -2895,7 +2898,7 @@ fn do_pass_bool_byte_closure_layout() {
|
||||||
test4 = if List.len ((oneOf [satisfyA, satisfyB]) [99, 100, 101] ) == 0 then "PASS" else "FAIL"
|
test4 = if List.len ((oneOf [satisfyA, satisfyB]) [99, 100, 101] ) == 0 then "PASS" else "FAIL"
|
||||||
|
|
||||||
|
|
||||||
main : Str
|
main : Str
|
||||||
main = [test1, test2, test3, test4] |> Str.joinWith ", "
|
main = [test1, test2, test3, test4] |> Str.joinWith ", "
|
||||||
"#
|
"#
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue