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

index 09c27d8f5446699d837c37b0c6c705846c019010..c58403ba9e87ff78cf47b32f0a9b2c25d5fa0b9b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2005, 2006 Alex Chapman, Daniel Ehrenberg
 ! See https://factorcode.org/license.txt for BSD license
-USING: arrays circular kernel math sequences sequences.private
+USING: arrays circular kernel literals math sequences sequences.private
 strings tools.test ;
 IN: circular.tests
 
@@ -19,6 +19,9 @@ IN: circular.tests
 { [ 3 1 2 ] } [ { 1 2 3 } <circular> 1 over change-circular-start 1 over change-circular-start [ ] like ] unit-test
 { [ 3 1 2 ] } [ { 1 2 3 } <circular> -100 over change-circular-start [ ] like ] unit-test
 
+{ $[ { 1 2 3 } minimum ] } [ { 1 2 3 } <circular> minimum ] unit-test
+{ $[ { 1 2 3 } maximum ] } [ { 1 2 3 } <circular> maximum ] unit-test
+
 { "fob" } [ "foo" <circular> CHAR: b 2 pick set-nth >string ] unit-test
 { "boo" } [ "foo" <circular> CHAR: b 3 pick set-nth-unsafe >string ] unit-test
 { "ornact" } [ "factor" <circular> 4 over change-circular-start CHAR: n 2 pick set-nth >string ] unit-test