From: nomennescio Date: Sat, 14 Oct 2023 00:14:46 +0000 (+0200) Subject: Added unit tests X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=158dbb1385986a908ae4155db3563869c7732bf4 Added unit tests --- diff --git a/basis/circular/circular-tests.factor b/basis/circular/circular-tests.factor index 09c27d8f54..c58403ba9e 100644 --- a/basis/circular/circular-tests.factor +++ b/basis/circular/circular-tests.factor @@ -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 } 1 over change-circular-start 1 over change-circular-start [ ] like ] unit-test { [ 3 1 2 ] } [ { 1 2 3 } -100 over change-circular-start [ ] like ] unit-test +{ $[ { 1 2 3 } minimum ] } [ { 1 2 3 } minimum ] unit-test +{ $[ { 1 2 3 } maximum ] } [ { 1 2 3 } maximum ] unit-test + { "fob" } [ "foo" CHAR: b 2 pick set-nth >string ] unit-test { "boo" } [ "foo" CHAR: b 3 pick set-nth-unsafe >string ] unit-test { "ornact" } [ "factor" 4 over change-circular-start CHAR: n 2 pick set-nth >string ] unit-test