mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
add tests for List.dropAt
This commit is contained in:
parent
3baff93a97
commit
700ab20a8c
3 changed files with 29 additions and 8 deletions
|
@ -198,6 +198,21 @@ fn list_drop() {
|
|||
assert_evals_to!("List.drop [1,2] 5", RocList::from_slice(&[]), RocList<i64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_drop_at() {
|
||||
assert_evals_to!(
|
||||
"List.dropAt [1, 2, 3] 0",
|
||||
RocList::from_slice(&[2, 3]),
|
||||
RocList<i64>
|
||||
);
|
||||
assert_evals_to!(
|
||||
"List.dropAt [0, 0, 0] 3",
|
||||
RocList::from_slice(&[1, 2, 3]),
|
||||
RocList<i64>
|
||||
);
|
||||
assert_evals_to!("List.dropAt [] 1", RocList::from_slice(&[]), RocList<i64>);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_swap() {
|
||||
assert_evals_to!("List.swap [] 0 1", RocList::from_slice(&[]), RocList<i64>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue