### ----------------------------------------------------
### -- List::MoreUtils
### -- Licenses: Artistic-2.0
### -- Authors: Elizabeth Mattijsen
### -- File: t/qsort.rakutest
### ----------------------------------------------------
use Test;
use List::MoreUtils <qsort>;

plan 2;

my @ltn_asc = <2 3 5 7 11 13 17 19 23 29 31 37>;
my @ltn_des = reverse @ltn_asc;
my @l;

@l = @ltn_des;
qsort -> $a, $b { $a <=> $b }, @l;
is-deeply @l, @ltn_asc, "sorted ascending";

@l = @ltn_asc;
qsort -> $a, $b { $b <=> $a }, @l;
is-deeply @l, @ltn_des, "sorted descending";

# vim: expandtab shiftwidth=4


