mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Swap List.repeat args order to put the list first
This commit is contained in:
parent
5fa368ff0a
commit
92e0f8714f
8 changed files with 20 additions and 20 deletions
|
@ -99,7 +99,7 @@ fn bool_list_literal() {
|
|||
true : Bool
|
||||
true = True
|
||||
|
||||
List.repeat 23 true
|
||||
List.repeat true 23
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[true; 23]),
|
||||
|
@ -112,7 +112,7 @@ fn bool_list_literal() {
|
|||
true : Bool
|
||||
true = True
|
||||
|
||||
List.repeat 23 { x: true, y: true }
|
||||
List.repeat { x: true, y: true } 23
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[[true, true]; 23]),
|
||||
|
@ -125,7 +125,7 @@ fn bool_list_literal() {
|
|||
true : Bool
|
||||
true = True
|
||||
|
||||
List.repeat 23 { x: true, y: true, a: true, b: true, c: true, d : true, e: true, f: true }
|
||||
List.repeat { x: true, y: true, a: true, b: true, c: true, d : true, e: true, f: true } 23
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[[true, true, true, true, true, true, true, true]; 23]),
|
||||
|
@ -1240,18 +1240,18 @@ fn list_single() {
|
|||
#[cfg(any(feature = "gen-llvm"))]
|
||||
fn list_repeat() {
|
||||
assert_evals_to!(
|
||||
"List.repeat 5 1",
|
||||
"List.repeat 1 5",
|
||||
RocList::from_slice(&[1, 1, 1, 1, 1]),
|
||||
RocList<i64>
|
||||
);
|
||||
assert_evals_to!(
|
||||
"List.repeat 4 2",
|
||||
"List.repeat 2 4",
|
||||
RocList::from_slice(&[2, 2, 2, 2]),
|
||||
RocList<i64>
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
"List.repeat 2 []",
|
||||
"List.repeat [] 2",
|
||||
RocList::from_slice(&[RocList::default(), RocList::default()]),
|
||||
RocList<RocList<i64>>
|
||||
);
|
||||
|
@ -1263,7 +1263,7 @@ fn list_repeat() {
|
|||
noStrs =
|
||||
[]
|
||||
|
||||
List.repeat 2 noStrs
|
||||
List.repeat noStrs 2
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[RocList::default(), RocList::default()]),
|
||||
|
@ -1271,7 +1271,7 @@ fn list_repeat() {
|
|||
);
|
||||
|
||||
assert_evals_to!(
|
||||
"List.repeat 15 4",
|
||||
"List.repeat 4 15",
|
||||
RocList::from_slice(&[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]),
|
||||
RocList<i64>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue