@@ -1583,12 +1583,18 @@ std.assertEqual(std.avg([1, 2, 3]), 2) &&
1583
1583
std.assertEqual (std.avg([0 , 0 , 0 ]), 0 ) &&
1584
1584
std.assertEqual (std.avg([1 , 1 , 2.5 ]), 1.5 ) &&
1585
1585
1586
- std.assertEqual (std.minArray([1 , 2 , 3 ]), 1 ) &&
1587
- std.assertEqual (std.minArray(['1' , '2' , '3' ]), '1' ) &&
1586
+ std.assertEqual (std.minArray([3 , 1 , 2 ]), 1 ) &&
1587
+ std.assertEqual (std.minArray(['3' , '1' , '2' ]), '1' ) &&
1588
+ std.assertEqual (std.minArray(['a2' , 'b1' ], keyF=function (x) x[0 ]), 'a2' ) &&
1589
+ std.assertEqual (std.minArray(['a2' , 'b1' ], keyF=function (x) x[1 ]), 'b1' ) &&
1590
+ std.assertEqual (std.minArray([], onEmpty='default' ), 'default' ) &&
1588
1591
1589
1592
std.assertEqual (std.maxArray([1 , 2 , 3 ]), 3 ) &&
1590
1593
std.assertEqual (std.maxArray(['1' , '2' , '3' ]), '3' ) &&
1591
1594
std.assertEqual (std.maxArray(['a' , 'x' , 'z' ]), 'z' ) &&
1595
+ std.assertEqual (std.maxArray(['a2' , 'b1' ], keyF=function (x) x[0 ]), 'b1' ) &&
1596
+ std.assertEqual (std.maxArray(['a2' , 'b1' ], keyF=function (x) x[1 ]), 'a2' ) &&
1597
+ std.assertEqual (std.maxArray([], onEmpty='default' ), 'default' ) &&
1592
1598
1593
1599
1594
1600
std.assertEqual (std.xor(true , false ), true ) &&
0 commit comments