]> gitweb.factorcode.org Git - factor.git/commitdiff
Added unit tests
authornomennescio <nomennescio@factorcode.org>
Sat, 14 Oct 2023 00:32:30 +0000 (02:32 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 23 Oct 2023 17:28:52 +0000 (10:28 -0700)
core/sequences/sequences-tests.factor

index 8e7b203dfd44aa9077328e205f6f27a27d391103..24262f31465c62fc1d8f1e65167cba5a1fffeb26 100644 (file)
@@ -390,6 +390,13 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ;
 { 24 } [ { 1 2 } { 3 4 } [ + ] [ * ] 2map-reduce ] unit-test
 { 2 96 } [ 2 { 3 3 3 3 } { 4 4 4 4 } [ [ dup ] 2dip * * ] [ + ] 2map-reduce ] unit-test
 
+{ 4 } [ 5 <iota> (maximum) ] unit-test
+{ 0 } [ 5 <iota> (minimum) ] unit-test
+{ 4 } [ 5 <iota> supremum ] unit-test
+{ 0 } [ 5 <iota> infimum ] unit-test
+{ 4 } [ 5 <iota> maximum ] unit-test
+{ 0 } [ 5 <iota> minimum ] unit-test
+
 { 4 } [ 5 <iota> [ ] supremum-by ] unit-test
 { 0 } [ 5 <iota> [ ] infimum-by ] unit-test
 { "bar" } [ { "bar" "baz" "qux" } [ length ] supremum-by ] unit-test