adding List.sortAsc builtin

This commit is contained in:
Eric Newbury 2022-01-21 15:34:24 -05:00
parent c0ea664141
commit 05c01a81f5
4 changed files with 52 additions and 1 deletions

View file

@ -2421,6 +2421,17 @@ fn list_sort_with() {
);
}
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn list_sort_asc() {
assert_evals_to!("List.sortAsc []", RocList::from_slice(&[]), RocList<i64>);
assert_evals_to!(
"List.sortAsc [ 4,3,2,1 ]",
RocList::from_slice(&[1, 2, 3, 4]),
RocList<i64>
);
}
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn list_any() {