USING: arrays kernel math math.combinatorics
math.combinatorics.private tools.test sequences ;
-IN: math.combinatorics.tests
{ 1 } [ -1 factorial ] unit-test ! required by other math.combinatorics words
{ 1 } [ 0 factorial ] unit-test
-USING: 24-game io.streams.string kernel math sequences tools.test ;
-IN: 24-game.tests
+USING: 24-game io.streams.string kernel math sequences
+tools.test ;
{ t } [ make-24 first4 makes-24? ] unit-test
! Copyright (C) 2011 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: 99-bottles io.streams.string tools.test ;
-IN: 99-bottles.tests
{
"99 bottles of beer on the wall, 99 bottles of beer.
! Copyright (C) 2012 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays.shaped kernel math sequences tools.test ;
-IN: arrays.shaped.tests
{ t } [
{ 5 5 } increasing
USING: asn1 asn1.ldap io io.streams.string tools.test ;
-IN: asn1.tests
{ 6 } [
"\u000002\u000001\u000006" [ asn-syntax read-ber ] with-string-reader
USING: assocs.extras kernel sequences tools.test ;
-IN: assocs.extras
-
{ f } [ f { } deep-at ] unit-test
{ f } [ f { "foo" } deep-at ] unit-test
{ f } [ H{ } { 1 2 3 } deep-at ] unit-test
! Copyright (c) 2009 Samuel Tardieu.
! See See http://factorcode.org/license.txt for BSD license.
USING: backtrack math tools.test ;
-IN: backtrack.tests
cut-amb
{ 1 } [ { 1 2 } amb ] unit-test
USING: kernel strings tools.test ;
-IN: base85
{ t } [ "Hello, world" dup >base85 base85> >string = ] unit-test
USING: benchmark.regex-dna io io.files io.encodings.ascii
io.streams.string kernel tools.test splitting ;
-IN: benchmark.regex-dna.tests
{ t } [
"resource:extra/benchmark/regex-dna/regex-dna-test-in.txt"
-IN: benchmark.reverse-complement.tests
USING: benchmark.reverse-complement checksums checksums.md5
io.files io.files.temp kernel math.parser tools.test ;
-USING: tools.test ;
-IN: bencode
+USING: bencode tools.test ;
{ "i42e" } [ 42 >bencode ] unit-test
{ "i0e" } [ 0 >bencode ] unit-test
! Copyright (C) 2010 Dmitry Shubin.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test boyer-moore ;
-IN: boyer-moore.tests
{ 0 } [ "qwerty" "" search ] unit-test
{ 0 } [ "" "" search ] unit-test
USING: brainfuck io.streams.string kernel literals math
math.parser math.ranges sequences tools.test ;
-IN: brainfuck
-
-
[ "+" run-brainfuck ] must-infer
[ "+" get-brainfuck ] must-infer
USING: calendar calendar.elapsed kernel tools.test ;
-IN: calendar.elapsed.tests
-
[ -1 elapsed-time ] [ "negative seconds" = ] must-fail-with
{ "0s" } [ 0 elapsed-time ] unit-test
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: calendar.holidays calendar.holidays.canada kernel
-tools.test ;
-IN: calendar.holidays.canada.tests
+sequences tools.test ;
-{ } [ 2009 canada holidays drop ] unit-test
+{ 1 } [ 2009 canadian-federal holidays length ] unit-test
! See http://factorcode.org/license.txt for BSD license.
USING: calendar.holidays calendar.holidays.us kernel sequences
tools.test ;
-IN: calendar.holidays.us.tests
{ 10 } [ 2009 us-federal holidays length ] unit-test
! Copyright (C) 2016 Alexander Ilin.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test checksums.process ;
-IN: checksums.process.tests
{ "" } [ "" trim-hash ] unit-test
{ "" } [ " aoeu" trim-hash ] unit-test
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test color-table ;
-IN: color-table.tests
! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.cmyk
+USING: arrays colors colors.cmyk kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
-USING: colors combinators tools.test ;
-IN: colors.distances
+USING: colors colors.distances combinators tools.test ;
{
0x1.05d584e1086dep6 ! 65.45851470579098
-USING: tools.test ;
-
-IN: colors.flex-hex
+USING: colors.flex-hex tools.test ;
{ "00b000" } [ "#zqbttv" flex-hex ] unit-test
! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.hsl
+USING: arrays colors colors.hsl kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.lab
+USING: arrays colors colors.lab kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.lch
+USING: arrays colors colors.lch kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.luv
+USING: arrays colors colors.luv kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.ryb
+USING: arrays colors colors.ryb kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.xyy
+USING: arrays colors colors.xyy kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2014 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.xyz
+USING: arrays colors colors.xyz kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.yiq
+USING: arrays colors colors.yiq kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays colors kernel locals math.functions math.ranges
-sequences tools.test ;
-
-IN: colors.yuv
+USING: arrays colors colors.yuv kernel locals math.functions
+math.ranges sequences tools.test ;
{ t } [
0.0 1.0 0.1 <range> [| r |
! See http://factorcode.org/license.txt for BSD license.
USING: combinators.extras io.files kernel math sequences
tools.test ;
-IN: combinators.extras.tests
{ "a b" }
[ "a" "b" [ " " glue ] once ] unit-test
USING: arrays ctags.private io.backend kernel sequences
tools.test ;
-IN: ctags.tests
{ t } [
"if\t" "resource:extra/unix/unix.factor" normalize-path "\t91" 3append
-USING: tools.test ;
-IN: cuesheet
+USING: cuesheet tools.test ;
{
T{ cuesheet
-USING: kernel math tools.test ;
-IN: dice
+USING: dice kernel math tools.test ;
{ [ 1 4 random-roll ] } [ "1d4" roll-quot ] unit-test
{ [ 1 4 random-roll 3 + ] } [ "1d4+3" roll-quot ] unit-test
! Copyright (C) 2010 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors byte-arrays elf kernel sequences system tools.test ;
-IN: elf.tests
cpu ppc? [
{
USING: enigma kernel math sequences sorting tools.test ;
-IN: enigma.tests
-
{ t } [ <reflector> natural-sort 26 <iota> sequence= ] unit-test
{ "" } [ "" 4 <enigma> encode ] unit-test
USING: fftw tools.test ;
-IN: fftw.tests
{
{ C{ 1.5 0.0 } C{ -0.5 0.0 } }
! Copyright (C) 2006 Chris Double. All Rights Reserved.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel tools.test peg fjsc ;
-IN: fjsc.tests
{ T{ ast-expression f V{ T{ ast-number f 55 } T{ ast-identifier f "2abc1" } T{ ast-number f 100 } } } } [
"55 2abc1 100" expression-parser parse
USING: flip-text tools.test ;
-IN: flip-text.tests
-
{
"068Ɫ95ᔭƐᄅ⇂zʎxʍʌnʇsɹbdouɯʃʞɾᴉɥᵷɟǝpɔqɐZ⅄XMΛՈ⊥SᴚΌԀONW⅂KᒋIH⅁ℲƎᗡϽ𐐒∀"
} [
! See http://factorcode.org/license.txt for BSD license.
USING: continuations fuel fuel.eval io.streams.string kernel math
namespaces random.data sequences tools.test vocabs.parser ;
-IN: fuel.eval.tests
! pop-restarts
{ V{ "um" } } [
! See http://factorcode.org/license.txt for BSD license.
USING: fuel.help fuel.help.private help help.topics sequences
tools.test ;
-IN: fuel.help.tests
{
{
! Copyright (C) 2009 Jose Antonio Ortega Ruiz.
! See http://factorcode.org/license.txt for BSD license.
USING: compiler.errors fuel.pprint io.streams.string tools.test ;
-IN: fuel.pprint.tests
{ "(source-file-error nil \"hi\")" } [
[ "hi" "there" <compiler-error> fuel-pprint ] with-string-writer
-IN: gml.tests
-USING: accessors combinators gml tools.test kernel sequences euler.b-rep ;
+USING: accessors combinators gml tools.test kernel sequences
+euler.b-rep ;
{ } [ [ "vocab:gml/test-core.gml" run-gml-file ] make-gml 2drop ] unit-test
USING: gml.viewer math.vectors.simd.cords tools.test ;
-IN: gml.viewer.tests
{ {
double-4{ 0 0 0 0 }
! See http://factorcode.org/license.txt for BSD license.
USING: accessors colors.constants google.charts
google.charts.private kernel math present sequences tools.test ;
-IN: google.charts.tests
! The order of the constructors below is important, because we
! are testing side-effects. If you remove the clone word from
-IN: grid-meshes.tests
USING: alien.c-types alien.data grid-meshes grid-meshes.private
specialized-arrays tools.test ;
SPECIALIZED-ARRAY: float
USING: arrays kernel math math.functions sequences tools.test ;
-IN: grouping.extras
{ { } } [ { 1 } [ 2array ] 2clump-map ] unit-test
{ { { 1 2 } } } [ { 1 2 } [ 2array ] 2clump-map ] unit-test
USING: hash-sets.numbers kernel sets tools.test ;
-IN: hash-sets.numbers.tests
-
{ t } [ 1.5 NHS{ 3/2 } in? ] unit-test
{ NHS{ 3/2 } } [
USING: assocs hashtables.numbers kernel literals sequences
tools.test ;
-IN: hashtables.numbers.tests
-
{ 1000 } [ 3/2 NH{ { 1.5 1000 } } at ] unit-test
{ 1001 } [
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test hello-unicode ;
-IN: hello-unicode.tests
-IN: html.elements.tests
USING: tools.test html.elements io.streams.string ;
{ "<a href='h&o'>" }
! Copyright (C) 2010 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: html.parser html.parser.analyzer kernel math sequences tools.test ;
-IN: html.parser.analyzer.tests
{ 0 3 }
[ 1 { 3 5 7 9 11 } [ odd? ] find-nth ] unit-test
USING: html.parser kernel tools.test ;
-IN: html.parser.tests
{
V{ T{ tag f "html" H{ } f f } }
-USING:
- html.parser html.parser.printer
- io.streams.string
- namespaces
- strings
- tools.test ;
-IN: html.parser.printer.tests
+USING: html.parser html.parser.printer io.streams.string
+namespaces strings tools.test ;
{
" "
-USING: assocs combinators continuations hashtables
-hashtables.private io kernel math
-namespaces prettyprint quotations sequences splitting
-strings tools.test html.parser.utils quoting ;
-IN: html.parser.utils.tests
+USING: html.parser.utils quoting tools.test ;
{ "'Rome'" } [ "Rome" single-quote ] unit-test
{ "\"Roma\"" } [ "Roma" double-quote ] unit-test
USING: images.bitmap images.testing kernel sequences ;
-IN: images.bitmap.tests
! "vocab:images/testing/bmp/1bit.bmp" bmp-image decode-test
! "vocab:images/testing/bmp/rgb_4bit.bmp" bmp-image decode-test
! Copyright (C) 2010 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: images.pbm images.testing sequences ;
-IN: images.pbm.tests
{
"vocab:images/testing/pbm/test.binary.pbm"
! Copyright (C) 2010 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: images.testing images.pgm sequences ;
-IN: images.pgm.tests
{
"vocab:images/testing/pgm/radial.binary.pgm"
! See http://factorcode.org/license.txt for BSD license.
USING: accessors images.png images.testing io.directories
io.encodings.binary io.files kernel sequences tools.test ;
-IN: images.png.tests
! Test files from PngSuite (http://www.libpng.org/pub/png/pngsuite.html)
! Copyright (C) 2010 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: images.testing images.ppm sequences ;
-IN: images.ppm.tests
{
"vocab:images/testing/ppm/binary.ppm"
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: images.testing images.tiff sequences ;
-IN: images.tiff.tests
{
"vocab:images/testing/tiff/octagon.tiff"
USING: ini-file tools.test ;
-IN: ini-file.tests
-
{ H{ } } [ "" string>ini ] unit-test
{ H{ { "section" H{ } } } } [ "[section]" string>ini ] unit-test
! Copyright (C) 2011 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test io.binary.fast ;
-IN: io.binary.fast.tests
{ 0x0102 } [ B{ 01 02 } 2be> ] unit-test
{ 0x01020304 } [ B{ 01 02 03 04 } 4be> ] unit-test
io.encodings.8-bit.latin1 io.encodings.binary
io.encodings.detect io.encodings.utf16 io.encodings.utf32
io.encodings.utf8 namespaces tools.test ;
-IN: io.encodings.detect.tests
! UTF encodings with BOMs
{ utf16be } [ B{ 0xFE 0xFF 0x00 0x31 0x00 0x32 0x00 0x33 } detect-byte-array ] unit-test
io.encodings.binary io.files io.streams.byte-array
io.streams.memory io.streams.peek io.streams.string kernel make
namespaces sequences strings tools.test ;
-IN: io.streams.peek.tests
{ CHAR: a }
[ "abc" <string-reader> <peek-stream> stream-read1 ] unit-test
! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license.
USING: accessors irc.messages irc.messages.parser tools.test ;
-IN: irc.messages.tests
-
! { "someuser" } [ "someuser!n=user@some.where" parse-name ] unit-test
USING: jamshred.oint tools.test ;
-IN: jamshred.oint.tests
{ { 0 -1 -1 } } [ { 0 1 -1 } { 0 -1 0 } reflect ] unit-test
{ { 0 1 0 } } [ { 1 1 0 } { 1 0 0 } proj-perp ] unit-test
-USING: eval kernel math tools.test ;
-IN: literate
+USING: eval kernel literate math tools.test ;
{ 2 3 t } [
<LITERATE
! Copyright (C) 2017 Björn Lindqvist
USING: kernel llvm.ffi tools.test ;
-IN: llvm.ffi.tests
{ } [
"my_module" LLVMModuleCreateWithName
USING: kernel literals llvm llvm.ffi system tools.test ;
-IN: llvm.tests
${ cpu x86.64? "x86-64" "x86-32" ? } [
initialize-native-target
USING: io.pathnames llvm.reader llvm.wrappers tools.test ;
-IN: llvm.reader.tests
{ t } [
"resource:extra/llvm/wrappers/add.bc" absolute-path load-module
! See http://factorcode.org/license.txt for BSD license
USING: kernel machine-learning.data-sets
machine-learning.decision-trees math.extras sequences tools.test ;
-IN: machine-learning.decision-trees.tests
{ { 0.08 0.01 0.0 0.03 0.29 0.0 } } [
"monks-1.train" load-monks
! Copyright (C) 2017 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test machine-learning.functions ;
-IN: machine-learning.functions.tests
{ 0 } [ 0 relu ] unit-test
{ .5 .000001 } [ .5 relu ] unit-test~
! See http://factorcode.org/license.txt for BSD license.
USING: kernel machine-learning.label-binarizer
machine-learning.transformer tools.test ;
-IN: machine-learning.label-binarizer.tests
{ { { 1 0 0 0 } { 0 0 0 1 } } } [
<label-binarizer> { 1 2 6 4 2 } over fit-y
! See http://factorcode.org/license.txt for BSD license.
USING: kernel machine-learning.label-encoder
machine-learning.transformer tools.test ;
-IN: machine-learning.label-encoder.tests
{ { 1 3 2 4 } } [
<label-encoder> { 1 2 3 4 3 2 3 2 2 3 2 } over fit-y
USING: assocs kernel machine-learning.rebalancing math
math.statistics math.text.english sequences tools.test
math.vectors ;
-IN: machine-learning.rebalancing.tests
{ t } [
{ 1 1 1 2 } [ [ number>text ] map ] [ ] bi
USING: magic system tools.test ;
-IN: magic.tests
{ "data" } [ image-path guess-file ] unit-test
{ "application/octet-stream" } [ image-path guess-mime-type ] unit-test
USING: io io.pathnames kernel mason.child mason.config
namespaces sequences system tools.test ;
-IN: mason.child.tests
{ t } [
H{
-IN: mason.common.tests
-USING: prettyprint mason.common mason.config
-namespaces calendar tools.test io.files
-io.files.temp io.encodings.utf8 sequences ;
+USING: prettyprint mason.common mason.config namespaces calendar
+tools.test io.files io.files.temp io.encodings.utf8 sequences ;
{ "00:01:02" } [ 62,000,000,000 nanos>time ] unit-test
USING: mason.config mason.disk namespaces io.directories
io.files.temp tools.test strings sequences ;
-IN: mason.disk.tests
"builds" temp-file builds-dir [
builds-dir get make-directories
-IN: mason.email.tests
USING: mason.email mason.common mason.config namespaces
tools.test system ;
USING: mason.config mason.platform namespaces tools.test
strings system ;
-IN: mason.platform.tests
{ t } [ platform string? ] unit-test
-[
- linux target-os set
- x86.32 target-cpu set
- f target-variant set
+{ "linux-x86-32" } [
+ H{
+ { target-os linux }
+ { target-cpu x86.32 }
+ { target-variant f }
+ } [ platform ] with-variables
+] unit-test
- [ "linux-x86-32" ] [ platform ] unit-test
-] with-scope
-
-[
- windows target-os set
- x86.32 target-cpu set
- "xp" target-variant set
-
- [ "windows-x86-32-xp" ] [ platform ] unit-test
-] with-scope
+{ "windows-x86-32-xp" } [
+ H{
+ { target-os windows }
+ { target-cpu x86.32 }
+ { target-variant "xp" }
+ } [ platform ] with-variables
+] unit-test
-USING: system tools.test ;
-
-IN: mason.release.archive
+USING: mason.release.archive system tools.test ;
{ ".dmg" } [ macosx extension ] unit-test
{ ".dmg" } [ "macosx" extension ] unit-test
-IN: mason.release.branch.tests
USING: mason.release.branch mason.config tools.test namespaces
system ;
+++ /dev/null
-IN: mason.release.upload.tests
-USING: mason.release.upload tools.test ;
! (c)2009 Joe Groff, see BSD license
USING: arrays kernel literals tools.test math math.affine-transforms
math.constants math.functions ;
-IN: math.affine-transforms.tests
{ { 7.25 4.25 } } [
{ 0.75 0.75 } { 0.75 -0.75 } { 5.0 5.0 } <affine-transform>
USING: kernel math math.approx math.constants
math.floating-point sequences tools.test ;
-IN: math.approx.tests
-
{ { 3 3 13/4 16/5 19/6 22/7 } }
[
pi double>ratio
USING: kernel tools.test sequences ;
-IN: math.binpack
-
{ { V{ } } } [ { } 1 binpack ] unit-test
{ { V{ 3 } V{ 2 1 } } } [ { 1 2 3 } 2 binpack ] unit-test
USING: kernel math.blas.matrices math.blas.vectors
sequences tools.test ;
-IN: math.blas.matrices.tests
! clone
USING: kernel math.blas.vectors math.functions sequences tools.test ;
-IN: math.blas.vectors.tests
! clone
-USING: math tools.test ;
-IN: math.combinatorics.bits
+USING: math math.combinatorics.bits tools.test ;
{ 0b101 } [ 0b011 next-permutation-bits ] unit-test
{ 0b110 } [ 0b101 next-permutation-bits ] unit-test
! Copyright (C) 2013 Loryn Jenkins.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.combinators tools.test ;
-IN: math.combinators.tests
{ 0 } [ -3 [ drop 0 ] when-negative ] unit-test
{ -2 } [ -3 [ 1 + ] when-negative ] unit-test
USING: kernel math math.compare math.functions sequences
tools.test ;
-IN: math.compare.tests
-
{ -1 } [ -1 5 absmin ] unit-test
{ -1 } [ -1 -5 absmin ] unit-test
USING: kernel math.distances math.functions tools.test ;
-IN: math.distances.tests
-
{ 1 } [ "hello" "jello" hamming-distance ] unit-test
{ 0.0 } [ { 1 2 3 } dup cosine-distance ] unit-test
! Copyright (C) 2009 Jason W. Merrill.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test math.dual kernel accessors math math.functions
- math.constants ;
-IN: math.dual.tests
+math.constants ;
{ 0.0 1.0 } [ 0 1 <dual> dsin unpack-dual ] unit-test
{ 1.0 0.0 } [ 0 1 <dual> dcos unpack-dual ] unit-test
USING: arrays kernel math math.extras math.ranges sequences
tools.test ;
-IN: math.extras.tests
-
{ { 1 -1/2 1/6 0 -1/30 0 1/42 0 -1/30 0 } }
[ 10 <iota> [ bernoulli ] map ] unit-test
-USING: kernel math.functions math.ranges sequences tools.test ;
-IN: math.factorials
+USING: kernel math.factorials math.functions math.ranges sequences tools.test ;
{ 1 } [ -1 factorial ] unit-test ! not necessarily correct
{ 1 } [ 0 factorial ] unit-test
USING: kernel math math.functions math.finance sequences
tools.test ;
-IN: math.finance.tests
-
{ { 1 2 3 4 5 } } [ { 1 2 3 4 5 } 1 ema ] unit-test
{ { 1+1/2 2+1/2 3+1/2 4+1/2 } } [ { 1 2 3 4 5 } 2 ema ] unit-test
{ { 2 3 4 } } [ { 1 2 3 4 5 } 3 ema ] unit-test
! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: arrays kernel grouping math sequences tools.test ;
-
-IN: math.hashcodes
+USING: arrays kernel grouping math math.hashcodes sequences
+tools.test ;
{ t } [
12 dup >bignum 12.0 12 0 complex boa 4array
! Copyright (C) 2013 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test kernel ;
-IN: math.matrices.laplace
+USING: math.matrices.laplace tools.test kernel ;
{ -2 } [ { { 1 2 } { 3 4 } } determinant ] unit-test
QUALIFIED-WITH: alien.c-types c
FROM: math.matrices => m~ ;
SPECIALIZED-ARRAY: float-4
-IN: math.matrices.simd.tests
{
S{ matrix4 f
USING: kernel math.numerical-integration tools.test math
math.constants math.functions ;
-IN: math.numerical-integration.tests
{ 50 } [ 0 10 [ ] integrate-simpson ] unit-test
{ 1000/3 } [ 0 10 [ sq ] integrate-simpson ] unit-test
-USING: kernel math.primes sequences tools.test ;
-IN: math.primes.solovay-strassen
+USING: kernel math.primes math.primes.solovay-strassen sequences
+tools.test ;
{ t } [
100,000 <iota> [ solovay-strassen ] filter
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: math.primes.twins tools.test ;
-IN: math.primes.twins.tests
{ { } } [ 3 twin-primes-upto ] unit-test
{ { V{ 3 5 } V{ 5 7 } V{ 11 13 } } } [ 13 twin-primes-upto ] unit-test
USING: math.functions math.text.english tools.test ;
-IN: math.text.english.tests
{ "zero" } [ 0 number>text ] unit-test
{ "twenty-one" } [ 21 number>text ] unit-test
USING: math.text.utils tools.test ;
-IN: math.text.utils.tests
{ { 1 999 2 } } [ 2999001 3 digit-groups ] unit-test
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: math.transforms.bwt tools.test ;
-IN: math.transforms.bwt.tests
{ "asdf" } [ "asdf" bwt ibwt ] unit-test
-USING: math.vectors tools.test ;
-IN: math.transforms.fft
+USING: math.transforms.fft math.vectors tools.test ;
! even lengths
USING: math.transforms.haar tools.test ;
-IN: math.transforms.haar.tests
{ { 3 2 -1 -2 3 0 4 1 } } [ { 7 1 6 6 3 -5 4 2 } haar ] unit-test
{ { 7 1 6 6 3 -5 4 2 } } [ { 3 2 -1 -2 3 0 4 1 } rev-haar ] unit-test
! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: math.vectors.homogeneous tools.test ;
-IN: math.vectors.homogeneous.tests
{ { 1.0 2.0 1.0 } } [ { 1.0 0.0 1.0 } { 0.0 2.0 1.0 } h+ ] unit-test
{ { 1.0 -2.0 1.0 } } [ { 1.0 0.0 1.0 } { 0.0 2.0 1.0 } h- ] unit-test
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien destructors kernel math
memory.piles tools.test ;
-IN: memory.piles.tests
{ 25 } [
[
USING: metar.private tools.test ;
-IN: metar.tests
{ { "RAB05" "E30" "SNB20" "E55" } }
[ "RAB05E30SNB20E55" split-recent-weather ] unit-test
USING: io.encodings.binary io.streams.byte-array midi
midi.private sequences tools.test ;
-IN: midi.tests
! variable-width numbers
{
USING: arrays generic kernel math models namespaces sequences assocs
tools.test models.history accessors ;
-IN: models.history.tests
f <history> "history" set
USING: money parser tools.test eval ;
-IN: money.tests
{ -1/10 } [ DECIMAL: -.1 ] unit-test
{ -1/10 } [ DECIMAL: -0.1 ] unit-test
! Copyright (C) 2007 Alex Chapman
! See http://factorcode.org/license.txt for BSD license.
USING: arrays morse strings tools.test ;
-IN: morse.tests
{ "?" } [ CHAR: \\ ch>morse ] unit-test
{ "..." } [ CHAR: s ch>morse ] unit-test
-USING: io.streams.string kernel math sequences tools.test ;
-
-IN: msgpack
+USING: io.streams.string kernel math msgpack sequences
+tools.test ;
{
{
-IN: msxml-to-csv.tests
USING: msxml-to-csv tools.test csv io.encodings.utf8
io.files.temp kernel ;
-IN: noise.tests
USING: noise tools.test sequences math ;
{ t } [ { 100 100 } perlin-noise-map-coords [ [ 100 <= ] all? ] all? ] unit-test
USING: oauth1 oauth1.private tools.test accessors kernel assocs
strings namespaces urls ;
-IN: oauth1.tests
{ "%26&b" } [ "&" "b" hmac-key ] unit-test
{ "%26&" } [ "&" f hmac-key ] unit-test
USING: accessors calendar kernel oauth2 tools.test urls ;
-IN: oauth2.tests
! assoc>tokens
{
! Copyright (C) 2009 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel pair-rocket tools.test ;
-IN: pair-rocket.tests
{ { "a" 1 } } [ "a" => 1 ] unit-test
{ { { "a" } { 1 } } } [ { "a" } => { 1 } ] unit-test
! See http://factorcode.org/license.txt for BSD license.
USING: kernel lists lists.lazy tools.test strings math
sequences parser-combinators arrays math.parser unicode ;
-IN: parser-combinators.tests
! Testing <&>
{ { T{ parse-result f { "a" "b" } T{ slice f 2 4 "abcd" } } } } [
+++ /dev/null
-! Copyright (C) 2010 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: pdf tools.test ;
-
-IN: pdf.tests
USING: pdf.units tools.test ;
-IN: pdf.units.tests
-
{ 0 } [ "0" string>points ] unit-test
{ 1 } [ "1" string>points ] unit-test
{ 1.5 } [ "1.5" string>points ] unit-test
USING: fonts pdf.wrap tools.test ;
-IN: pdf.wrap.tests
{ "hello, " "extra spaces" } [
"hello, extra spaces" word-split1
! Copyright (C) 2008 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
-!
-USING: kernel tools.test peg.javascript peg.javascript.ast accessors ;
-IN: peg.javascript.tests
+
+USING: kernel tools.test peg.javascript peg.javascript.ast ;
{ T{ ast-begin f V{ T{ ast-number f 123 } } } } [
"123;" parse-javascript
! Copyright (C) 2008 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
-!
-USING: kernel tools.test peg peg.javascript.ast peg.javascript.parser
- accessors sequences math peg.ebnf peg.ebnf.private ;
-IN: peg.javascript.parser.tests
+
+USING: kernel tools.test peg peg.javascript.ast
+peg.javascript.parser accessors sequences math peg.ebnf
+peg.ebnf.private ;
{
T{
! Copyright (C) 2008 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
-!
-USING: kernel tools.test peg peg.javascript.ast peg.javascript.tokenizer accessors ;
-IN: peg.javascript.tokenizer.tests
+
+USING: kernel tools.test peg peg.javascript.ast
+peg.javascript.tokenizer accessors ;
{
V{
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
-!
+
USING: kernel tools.test peg peg.ebnf peg.ebnf.private peg.pl0
- sequences accessors ;
-IN: peg.pl0.tests
+sequences accessors ;
{ t } [
"CONST foo = 1;" "block" \ pl0 rule (parse) remaining>> empty?
-USING: accessors kernel math math.order poker poker.private tools.test ;
-IN: poker.tests
+USING: accessors kernel math math.order poker poker.private
+tools.test ;
{ 134236965 } [ "KD" >ckf ] unit-test
{ 529159 } [ "5s" >ckf ] unit-test
! See http://factorcode.org/license.txt for BSD license.
USING: concurrency.promises namespaces kernel pop3 pop3.server
sequences tools.test accessors calendar ;
-IN: pop3.tests
FROM: pop3 => count delete ;
-IN: rpn.tests
USING: rpn lists tools.test ;
{ { 2 } } [ "4 2 -" rpn-parse rpn-eval list>array ] unit-test
USING: kernel math.order random semantic-versioning sequences
sorting tools.test ;
-IN: semantic-versioning.tests
{
{
! Copyright (C) 2013 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: math sequences sets.extras tools.test ;
-IN: sets.extras.tests
{ { } } [ { } { } setwise-xor ] unit-test
{ { 1 } } [ { 1 } { } setwise-xor ] unit-test
-IN: smalltalk.eval.tests
USING: smalltalk.eval tools.test io.streams.string kernel ;
{ 3 } [ "1+2" eval-smalltalk ] unit-test
-IN: smalltalk.printer.tests
USING: smalltalk.printer tools.test ;
{ "#((1 2) 'hi')" } [ { { 1 2 } "hi" } smalltalk>string ] unit-test
! Copyright (C) 2014 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: calendar subrip-subtitles tools.test ;
-IN: subrip-subtitles.tests
{
{
USING: kernel money tools.test
taxes.usa taxes.usa.federal taxes.usa.mn
calendar taxes.usa.w4 usa-cities math.finance ;
-IN: taxes.usa.tests
{
426 23
USING: sequences strings terminfo tools.test ;
-IN: terminfo.tests
{ t } [
"vt102" terminfo-names member?
+++ /dev/null
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test time-server ;
-IN: time-server.tests
-USING: calendar formatting kernel tools.test ;
-
-IN: tzinfo
+USING: calendar formatting kernel tools.test tzinfo ;
{
"Sun Oct 27 01:00:00 2002"
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel tools.test usa-cities ;
-IN: usa-cities.tests
{ t } [ 55406 find-zip-code name>> "Minneapolis" = ] unit-test