-USING: accessors calendar calendar.format io io.streams.string
-kernel math.order sequences tools.test ;
+USING: accessors calendar calendar.format sequences tools.test ;
IN: calendar.format.tests
-{ } [ now timestamp>rfc3339 drop ] unit-test
-{ } [ now timestamp>rfc822 drop ] unit-test
+CONSTANT: testtime T{ timestamp
+ { year 2018 }
+ { month 2 }
+ { day 15 }
+ { hour 8 }
+ { minute 51 }
+ { second 44+423303/500000 }
+ { gmt-offset T{ duration { hour -8 } } }
+}
+
+{ "2018-02-15T08:51:44.846606-08:00" } [ testtime timestamp>rfc3339 ] unit-test
+
+{ "Thu, 15 Feb 2018 08:51:44 -0800" } [ testtime timestamp>rfc822 ] unit-test
{ }
[ { 2008 2009 } [ year. ] each ] unit-test
-
{ "03:01:59" } [
3 hours 1 >>minute 59 >>second duration>hms
] unit-test
! Copyright (C) 2016 Alexander Ilin.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test checksums checksums.crc16 ;
-IN: checksums.crc16.tests
{ B{ 0xb8 0x80 } } [
B{ 0x01 0x04 0x02 0xFF 0xFF } crc16 checksum-bytes
! Copyright (C) 2010 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: checksums checksums.internet tools.test ;
-IN: checksums.internet.tests
{ B{ 255 255 } } [ { } internet checksum-bytes ] unit-test
{ B{ 254 255 } } [ { 1 } internet checksum-bytes ] unit-test
{ B{ 254 253 } } [ { 1 2 } internet checksum-bytes ] unit-test
{ B{ 251 253 } } [ { 1 2 3 } internet checksum-bytes ] unit-test
-: test-data ( -- bytes )
+{ B{ 34 13 } } [
B{
0x00 0x01
0xf2 0x03
0xf4 0xf5
0xf6 0xf7
- } ;
-
-{ B{ 34 13 } } [ test-data internet checksum-bytes ] unit-test
+ } internet checksum-bytes
+] unit-test
! Copyright (C) 2017 Jon Harper.
! See http://factorcode.org/license.txt for BSD license.
USING: checksums checksums.ripemd strings tools.test ;
-IN: checksums.ripemd.tests
{ B{
0x9c 0x11 0x85 0xa5 0xc5
USING: arrays checksums checksums.common checksums.sha
checksums.sha.private io.encodings.binary io.streams.byte-array
kernel math.parser sequences tools.test random ;
-IN: checksums.sha.tests
-
-: test-checksum ( text identifier -- checksum )
- checksum-bytes bytes>hex-string ;
{ "a9993e364706816aba3e25717850c26c9cd0d89d" } [ "abc" sha1 checksum-bytes bytes>hex-string ] unit-test
{ "84983e441c3bd26ebaae4aa1f95129e5e54670f1" } [ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" sha1 checksum-bytes bytes>hex-string ] unit-test
{ "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525" }
[
"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
- sha-224 test-checksum
+ sha-224 checksum-bytes bytes>hex-string
] unit-test
{ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }
-[ "" sha-256 test-checksum ] unit-test
+[ "" sha-256 checksum-bytes bytes>hex-string ] unit-test
{ "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" }
-[ "abc" sha-256 test-checksum ] unit-test
+[ "abc" sha-256 checksum-bytes bytes>hex-string ] unit-test
{ "f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650" }
-[ "message digest" sha-256 test-checksum ] unit-test
+[ "message digest" sha-256 checksum-bytes bytes>hex-string ] unit-test
{ "71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73" }
-[ "abcdefghijklmnopqrstuvwxyz" sha-256 test-checksum ] unit-test
+[ "abcdefghijklmnopqrstuvwxyz" sha-256 checksum-bytes bytes>hex-string ] unit-test
{ "db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0" }
[
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
- sha-256 test-checksum
+ sha-256 checksum-bytes bytes>hex-string
] unit-test
{ "f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e" }
[
"12345678901234567890123456789012345678901234567890123456789012345678901234567890"
- sha-256 test-checksum
+ sha-256 checksum-bytes bytes>hex-string
] unit-test
! [ "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909" ]
-! [ "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu" sha-512 test-checksum ] unit-test
+! [ "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu" sha-512 checksum-bytes bytes>hex-string ] unit-test
{
t
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test fonts ;
-IN: fonts.tests
-USING: accessors io.sockets.secure http.client http.client.private http
+USING: accessors http http.client http.client.private
io.streams.string kernel namespaces sequences tools.test urls ;
IN: http.client.tests
USING: accessors assocs continuations http http.server
-http.server.requests io.encodings.utf8 io.encodings.binary io.streams.string
-kernel math peg sequences tools.test urls ;
-IN: http.server.tests
+http.server.requests io.encodings.utf8 io.encodings.binary
+io.streams.string kernel math peg sequences tools.test urls ;
{ t } [ [ \ + first ] [ <500> ] recover response? ] unit-test
USING: http.server.static tools.test xml.writer ;
-IN: http.server.static.tests
{ } [ "resource:basis" directory>html write-xml ] unit-test
-USING: kernel tools.test math namespaces prettyprint
-sequences inspector io.streams.string ;
-IN: inspector.tests
+USING: kernel tools.test math namespaces prettyprint sequences
+inspector io.streams.string ;
[ 1 2 3 ] describe
f describe
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: interpolate io.streams.string namespaces tools.test locals ;
-IN: interpolate.tests
{ "A B" } [ "A" "B" "${1} ${0}" interpolate>string ] unit-test
{ "B A" } [ "A" "B" "${0} ${1}" interpolate>string ] unit-test
-IN: io.crlf.tests
USING: io.crlf tools.test io.streams.string io ;
{ "Hello, world." } [ "Hello, world." [ read-crlf ] with-string-reader ] unit-test
USING: io.directories io.directories.hierarchy kernel
sequences tools.test ;
-IN: io.directories.hierarchy.tests
{ { "classes/tuple/tuple.factor" } } [
"resource:core" [
USING: io.encodings.string io.encodings.8-bit
io.encodings.8-bit.private tools.test strings arrays
io.encodings.8-bit.latin1 io.encodings.8-bit.windows-1252 ;
-IN: io.encodings.8-bit.tests
{ B{ CHAR: f CHAR: o CHAR: o } } [ "foo" latin1 encode ] unit-test
[ { 256 } >string latin1 encode ] must-fail
! Copyright (C) 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: io.encodings.gb18030 io.encodings.string strings tools.test arrays ;
-IN: io.encodings.gb18030.tests
{ "hello" } [ "hello" gb18030 encode >string ] unit-test
{ "hello" } [ "hello" gb18030 decode ] unit-test
USING: io.encodings.strict io.encodings.ascii tools.test
arrays io.encodings.string ;
-IN: io.encodings.strict.tests
{ { 0xfffd } } [ { 128 } ascii decode >array ] unit-test
[ { 128 } ascii strict decode ] must-fail
! See http://factorcode.org/license.txt for BSD license.
USING: strings io.encodings.utf8 io.encodings.utf16
io.encodings.string tools.test io.encodings.binary ;
-IN: io.encodings.string.tests
{ "hello" } [ "hello" utf8 decode ] unit-test
{ B{ 0 1 22 255 } } [ B{ 0 1 22 255 } binary decode ] unit-test
USING: kernel tools.test io.encodings.utf32 arrays sbufs
io.streams.byte-array sequences io.encodings io strings
io.encodings.string alien.c-types alien.strings accessors classes ;
-IN: io.encodings.utf32.tests
{ { CHAR: x } } [ B{ 0 0 0 CHAR: x } utf32be decode >array ] unit-test
{ { 0x1D11E } } [ B{ 0 1 0xD1 0x1E } utf32be decode >array ] unit-test
USING: io.encodings.string io.encodings.utf7 kernel sequences strings
tools.test ;
-IN: io.encodings.utf7.tests
{
{
USING: io.files.info io.encodings.utf8 io.files
io.directories kernel io.pathnames accessors tools.test
sequences io.files.temp ;
-IN: io.files.info.tests
{ "hi41" } [
[
! Copyright (C) 2015 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test io.files.info.unix.linux ;
-IN: io.files.info.unix.linux.tests
[ "/media/erg/4TB D" ]
[ "/media/erg/4TB\\040D" decode-mount-point ] unit-test
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test io.files.info.windows system kernel ;
-IN: io.files.info.windows.tests
[ ] [ vm-path file-times 3drop ] unit-test
io.directories.hierarchy io.encodings.ascii io.files
io.files.info io.files.temp io.files.unique io.pathnames kernel
namespaces sequences strings tools.test ;
-IN: io.files.unique.tests
{ 123 } [
[
io.files.temp io.files.windows io.pathnames kernel kernel.private libc
literals memory sequences splitting tools.test windows.kernel32
io.files.unique destructors ;
-IN: io.files.windows.tests
[ f ] [ "\\foo" absolute-path? ] unit-test
[ t ] [ "\\\\?\\c:\\foo" absolute-path? ] unit-test
-USING: io io.pipes io.streams.string io.encodings.utf8
-io.encodings.binary io.streams.duplex io.encodings io.timeouts
-namespaces continuations tools.test kernel calendar destructors
-accessors debugger math sequences threads
-concurrency.count-downs fry ;
-IN: io.pipes.tests
+USING: accessors calendar concurrency.count-downs continuations
+destructors fry io io.encodings io.encodings.binary
+io.encodings.utf8 io.pipes io.streams.duplex io.streams.string
+io.timeouts kernel math namespaces threads tools.test ;
{ "Hello" } [
utf8 <pipe> [
USING: tools.test io.pipes io.pipes.unix io.encodings.utf8
io.encodings io namespaces sequences ;
-IN: io.pipes.unix.tests
[ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test
-IN: io.sockets.secure.tests
-USING: accessors io.sockets io.sockets.secure io.sockets.secure.debug
-kernel system tools.test ;
+USING: accessors io.sockets io.sockets.secure
+io.sockets.secure.debug kernel system tools.test ;
{ "hello" 24 } [ "hello" 24 <inet> "hello" <secure> [ host>> ] [ port>> ] bi ] unit-test
! Copyright (C) 2011 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: io.standard-paths io.standard-paths.macosx tools.test ;
-IN: io.standard-paths.macosx.tests
{ "/System/Library/CoreServices/Finder.app" }
[ "com.apple.finder" find-native-bundle ] unit-test
+++ /dev/null
-! Copyright (C) 2011 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test io.standard-paths ;
-IN: io.standard-paths.tests
-USING: kernel sequences tools.test ;
-
-IN: ip-parser
+USING: ip-parser kernel sequences tools.test ;
{ "0.0.0.1" } [ "1" normalize-ipv4 ] unit-test
{ "1.0.0.2" } [ "1.2" normalize-ipv4 ] unit-test
! Copyright (C) 2016 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: io.streams.string json.prettyprint json.reader tools.test ;
-IN: json.prettyprint.tests
[
"{
USING: hashtables io.streams.string json json.reader
json.reader.private kernel literals math strings tools.test ;
-IN: json.reader.tests
{ f } [ "false" json> ] unit-test
{ t } [ "true" json> ] unit-test
! See http://factorcode.org/license.txt for BSD license.
USING: lcs lcs.diff2html kernel tools.test strings sequences
xml.writer ;
-IN: lcs.diff2html.tests
{ } [
"hello" "heyo" [ [ 1string ] { } map-as ] bi@
-IN: libc.tests
USING: destructors kernel libc libc.private namespaces
tools.test ;
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs kernel linked-assocs math sequences
tools.test ;
-IN: linked-assocs.tests
{ { 1 2 3 } } [
<linked-hash> 1 "b" pick set-at
USING: fry kernel sequences tools.test ;
-IN: math.primes.erato.fast
{
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test math.primes.lucas-lehmer ;
-IN: math.primes.lucas-lehmer.tests
{ t } [ 2 lucas-lehmer ] unit-test
{ t } [ 3 lucas-lehmer ] unit-test
USING: kernel math.primes.miller-rabin sequences tools.test ;
-IN: math.primes.miller-rabin.tests
{ f } [ 473155932665450549999756893736999469773678960651272093993257221235459777950185377130233556540099119926369437865330559863 miller-rabin ] unit-test
{ t } [ 2 miller-rabin ] unit-test
USING: arrays kernel math math.primes math.primes.miller-rabin
sequences tools.test ;
-IN: math.primes.tests
{ 1237 } [ 1234 next-prime ] unit-test
{ f t } [ 1234 prime? 1237 prime? ] unit-test
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: math.primes.safe math.primes.safe.private tools.test ;
-IN: math.primes.safe.tests
{ 863 } [ 862 next-safe-prime ] unit-test
{ f } [ 862 safe-prime? ] unit-test
USING: arrays kernel math math.ranges sequences sets tools.test ;
-IN: math.ranges.tests
{ { } } [ 1 1 (a,b) >array ] unit-test
{ { } } [ 1 1 (a,b] >array ] unit-test
USING: arrays assocs kernel math math.functions math.statistics sequences
math.order tools.test math.vectors ;
FROM: math.ranges => [a,b] ;
-IN: math.statistics.tests
{ 3 } [ { 1 2 3 4 5 } 1 power-mean ] unit-test
{ t } [ { 1 2 3 4 5 } [ 2 power-mean ] [ quadratic-mean ] bi 1e-10 ~ ] unit-test
-IN: mime.types.tests
USING: mime.types tools.test ;
{ "application/postscript" } [ "foo.ps" mime-type ] unit-test
USING: arrays generic kernel math models namespaces sequences assocs
tools.test models.arrow accessors ;
-IN: models.arrow.tests
3 <model> "x" set
"x" get [ 2 * ] <arrow> dup "z" set
-IN: models.arrows.smart.tests
USING: models.arrow.smart tools.test accessors models math kernel ;
{ 7 } [ 3 <model> 4 <model> [ + ] <smart-arrow> [ activate-model ] [ value>> ] bi ] unit-test
USING: arrays generic kernel math models namespaces sequences assocs
tools.test models.mapping accessors make ;
-IN: models.mapping.tests
! Test mapping
{ } [
-IN: nmake.tests
USING: nmake kernel tools.test ;
{ } [ [ ] { } nmake ] unit-test
USING: arrays continuations debugger io.streams.string peg tools.test ;
-IN: peg.debugger.tests
{ "Peg parsing error at character position 0.\nExpected 'A' or 'B'\nGot 'xxxx'\n" } [
[ "xxxx" "A" token "B" token 2array choice parse ] [ ] recover
-IN: porter-stemmer.tests
USING: arrays assocs io kernel porter-stemmer sequences
tools.test io.files io.encodings.utf8 ;
-IN: present.tests
USING: kernel math present sequences tools.test vocabs
vocabs.hierarchy ;
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test quoting ;
-IN: quoting.tests
{ f } [ "" quoted? ] unit-test
{ t } [ "''" quoted? ] unit-test
USING: sorting.human tools.test sorting.slots sorting ;
-IN: sorting.human.tests
{ { "x1y" "x2" "x10y" } }
[ { "x1y" "x10y" "x2" } { human<=> } sort-by ] unit-test
-IN: sorting.insertion
USING: sorting.insertion sequences kernel tools.test ;
-{ { { 1 1 } { 1 2 } { 2 0 } } } [ { { 2 0 } { 1 1 } { 1 2 } } dup [ first ] insertion-sort ] unit-test
+{ { { 1 1 } { 1 2 } { 2 0 } } } [
+ { { 2 0 } { 1 1 } { 1 2 } } dup [ first ] insertion-sort
+] unit-test
-IN: soundex.tests
USING: soundex tools.test ;
{ "S162" } [ "supercalifrag" soundex ] unit-test
-IN: splitting.monotonic
-USING: tools.test math arrays kernel sequences ;
+USING: tools.test math arrays kernel sequences
+splitting.monotonic ;
{ { } } [ { } [ < ] monotonic-split ] unit-test
{ { { 1 } } } [ { 1 } [ < ] monotonic-split ] unit-test
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test strings.tables ;
-IN: strings.tables.tests
{ { } } [ { } format-table ] unit-test
! Copyright (C) 2008 Marc Fauconneau.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test suffix-arrays kernel namespaces sequences ;
-IN: suffix-arrays.tests
! built from [ all-words 10 head [ name>> ] map ]
{ } [
USING: system-info.linux strings splitting sequences
tools.test kernel ;
-IN: system-info.linux.tests
[ 6 ] [ uname length ] unit-test
USING: math math.order strings system-info.windows tools.test
system-info ;
-IN: system-info.windows.tests
[ t ] [ cpus integer? ] unit-test
[ t ] [ username string? ] unit-test
USING: timers timers.private calendar concurrency.count-downs
concurrency.promises fry kernel math math.order sequences
threads tools.test tools.time ;
-IN: timers.tests
{ } [
1 <count-down>
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test math kernel sets generic
ui.baseline-alignment ui.baseline-alignment.private ;
-IN: ui.baseline-alignment.tests
! Test baseline calculations
{ 10 0 } [ 0 10 0 10 combine-metrics ] unit-test
-IN: ui.gadgets.borders.tests
USING: accessors kernel math.rectangles namespaces tools.test
ui.gadgets ui.gadgets.borders ui.gadgets.borders.private
ui.gadgets.editors ;
USING: accessors kernel models namespaces tools.test ui.gadgets
ui.gadgets.buttons ;
-IN: ui.gadgets.buttons.tests
{ } [
2 <model> {
-IN: ui.gadgets.canvas.tests
USING: ui.gadgets.canvas tools.test kernel ;
{ 1 0 } [ [ drop ] draw-canvas ] must-infer-as
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.gadgets.debug ;
-IN: ui.gadgets.debug.tests
ui.gadgets ui.gadgets.grids prettyprint documents ui.gestures
ui.gadgets.debug models documents.elements ui.gadgets.scrollers
ui.gadgets.line-support sequences ;
-IN: ui.gadgets.editors.tests
{ "foo bar" } [
<editor> "editor" set
USING: accessors kernel namespaces tools.test ui.gadgets
ui.gadgets.frames ui.gadgets.grids ui.gadgets.labels ;
-IN: ui.gadgets.frames.tests
{ } [ 3 3 <frame> { 1 1 } >>filled-cell layout ] unit-test
-IN: ui.gadgets.glass.tests
USING: tools.test ui.gadgets.glass ui.gadgets.worlds ui.gadgets
math.rectangles namespaces accessors models sequences arrays ;
USING: accessors colors.constants sequences tools.test
ui.gadgets ui.gadgets.labeled ;
-IN: ui.gadgets.labeled.tests
{ t } [
<gadget> "Hey" <labeled-gadget> content>> gadget?
USING: accessors tools.test ui.gadgets ui.gadgets.labels ;
-IN: ui.gadgets.labels.tests
{ { 119 14 } } [
<gadget> { 100 14 } >>dim
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays kernel tools.test ui.gadgets.editors
ui.gadgets.line-support ui.gadgets.line-support.private ui.text ;
-IN: ui.gadgets.line-support.tests
! line-gadget-height
{ t } [
ui.gadgets.labels ui.gadgets ui.gadgets.debug ui.render
ui.baseline-alignment kernel namespaces tools.test math.parser
sequences math.rectangles accessors math ;
-IN: ui.gadgets.packs.tests
{ t } [
{ 0 0 } { 100 100 } <rect> clip set
USING: math ui.gadgets.presentations ui.gadgets tools.test
prettyprint ui.gadgets.buttons io io.streams.string kernel
classes.tuple accessors ;
-IN: ui.gadgets.presentations.tests
{ t } [
"Hi" \ + <presentation> gadget?
math.vectors arrays sequences ui.gadgets.debug math.rectangles
accessors ui.gadgets.buttons ui.gadgets.packs
ui.gadgets.scrollers.private ;
-IN: ui.gadgets.scrollers.tests
{ } [
<gadget> "g" set
-IN: ui.gadgets.search-tables.tests
USING: ui.gadgets.search-tables ui.gadgets.tables ui.gadgets models
arrays sequences tools.test ;
USING: kernel ui.gadgets ui.gadgets.tracks tools.test
math.rectangles accessors sequences namespaces ;
-IN: ui.gadgets.tracks.tests
{ { 100 100 } } [
vertical <track>
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.images ;
-IN: ui.images.tests
USING: accessors alien.c-types colors.constants kernel
specialized-arrays tools.test ui.gadgets.labels
ui.pens.caching ui.pens.gradient ;
-IN: ui.pens.caching.tests
SPECIALIZED-ARRAY: float
USING: tools.test ui.pens.gradient ui.pens.gradient.private
colors.constants specialized-arrays alien.c-types ;
SPECIALIZED-ARRAY: float
-IN: ui.pens.gradient.tests
{
float-array{
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.pens.image ;
-IN: ui.pens.image.tests
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.pens ;
-IN: ui.pens.tests
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.pens.polygon ;
-IN: ui.pens.polygon.tests
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.pens.solid ;
-IN: ui.pens.solid.tests
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.pens.tile ;
-IN: ui.pens.tile.tests
+++ /dev/null
-USING: accessors colors.constants namespaces tools.test
-ui.gadgets.labels ui.pens.gradient ui.render ui.render.private ;
-IN: ui.render.tests
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test ui.text images fonts math arrays accessors kernel
sequences ;
-IN: ui.text.tests
{ t } [ 0 sans-serif-font "aaa" offset>x zero? ] unit-test
{ t } [ 1 sans-serif-font "aaa" offset>x 0.0 > ] unit-test
-IN: ui.tools.browser.tests
USING: tools.test ui.gadgets.debug ui.tools.browser math ;
{ } [ \ + <browser-gadget> [ ] with-grafted-gadget ] unit-test
USING: kernel tools.test ui.gadgets.worlds ui.tools.debugger ;
-IN: ui.tools.debugger.tests
-
{ f } [
f <world-attributes> <world> world-error boa error-in-debugger?
-IN: ui.tools.inspector.tests
USING: tools.test ui.tools.inspector math models ;
{ } [ \ + <model> <inspector-gadget> com-edit-slot ] unit-test
USING: accessors documents io.styles kernel namespaces
sequences tools.test ui.tools.listener.history ;
-IN: ui.tools.listener.history.tests
-
{ } [ <document> "d" set ] unit-test
{ } [ "d" get <history> "h" set ] unit-test
+++ /dev/null
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.tools.listener.popups ;
-IN: ui.tools.listener.popups.tests
+++ /dev/null
-USING: ui.tools.walker tools.test ;
-IN: ui.tools.walker.tests
+++ /dev/null
-USING: assocs continuations kernel threads tools.test ui ;
-IN: ui.tests
USING: unrolled-lists tools.test deques kernel sequences
random prettyprint grouping math ;
-IN: unrolled-lists.tests
{ 1 } [ <unrolled-list> 1 over push-front pop-front ] unit-test
{ 1 } [ <unrolled-list> 1 over push-front pop-back ] unit-test
-IN: urls.encoding.tests
USING: urls.encoding tools.test arrays kernel assocs present
accessors linked-assocs ;
USING: kernel uuid tools.test ;
-IN: uuid.tests
-
{ t } [ NAMESPACE_DNS [ uuid-parse uuid-unparse ] keep = ] unit-test
{ t } [ NAMESPACE_URL [ uuid-parse uuid-unparse ] keep = ] unit-test
{ t } [ NAMESPACE_OID [ uuid-parse uuid-unparse ] keep = ] unit-test
-USING: io.pathnames tools.test urls ;
-IN: webbrowser
+USING: io.pathnames tools.test urls webbrowser ;
{ t } [ "http://reddit.com" url-string? ] unit-test
{ t } [ "https://reddit.com" url-string? ] unit-test
! Copyright (C) 2008, 2009 Daniel Ehrenberg, Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: kernel tools.test wrap.strings ;
-IN: wrap.strings.tests
{
"This is a
! Copyright (C) 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test wrap.words sequences ;
-IN: wrap.words.tests
{ { } } [ f 35 wrap-words ] unit-test
{ { } } [ { } 35 wrap-words ] unit-test
-USING: assocs tools.test ;
-IN: xml.data
+USING: assocs tools.test xml.data ;
{ "bob" } [ "test" { { "name" "bob" } } { } <tag> "name" of ] unit-test
+++ /dev/null
-! Copyright (C) 2009 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test xml.entities.html ;
-IN: xml.entities.html.tests
! Copyright (C) 2005, 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: xml xml.traversal tools.test xml.data sequences arrays kernel ;
-IN: xml.traversal.tests
{ "bar" } [ "<foo>bar</foo>" string>xml children>string ] unit-test
-IN: xmode.catalog.tests
USING: xmode.catalog tools.test hashtables assocs
kernel sequences io ;
-IN: xmode.code2html.tests
-USING: xmode.code2html xmode.catalog
-tools.test multiline splitting memoize
-kernel io.streams.string xml.writer ;
+USING: xmode.code2html xmode.catalog tools.test multiline
+splitting memoize kernel io.streams.string xml.writer ;
{ } [ \ (load-mode) reset-memoized ] unit-test
-IN: xmode.keyword-map.tests
USING: xmode.keyword-map xmode.tokens
tools.test namespaces assocs kernel strings ;
USING: xmode.tokens xmode.catalog
xmode.marker tools.test kernel ;
-IN: xmode.marker.tests
{
{
-IN: xmode.rules.tests
USING: xmode.rules tools.test ;
{ { 1 2 3 } } [ f { 1 2 3 } ?push-all ] unit-test
USING: alien.strings alien.c-types alien.data tools.test
kernel libc io.encodings.utf8 io.encodings.utf16 io.encodings.utf16n
io.encodings.ascii alien io.encodings.string io.encodings.8-bit.latin1 ;
-IN: alien.strings.tests
{ "\u0000ff" }
[ "\u0000ff" latin1 string>alien latin1 alien>string ]
USING: accessors effects effects.parser eval kernel prettyprint
sequences tools.test math ;
-IN: effects.tests
{ t } [ { "a" } { "a" } <effect> { "a" "b" } { "a" "b" } <effect> effect<= ] unit-test
{ f } [ { "a" } { } <effect> { "a" "b" } { "a" "b" } <effect> effect<= ] unit-test
USING: classes kernel layouts math sequences tools.test ;
-IN: growable.tests
! erg found this one
{ fixnum } [
USING: tools.test io.backend kernel ;
-IN: io.backend.tests
{ } [ "a" normalize-path drop ] unit-test
USING: alien.c-types alien.data arrays io io.encodings.ascii
io.encodings.binary io.encodings.utf8 io.streams.byte-array
kernel math specialized-arrays strings tools.test ;
-IN: io.streams.byte-array.tests
SPECIALIZED-ARRAY: int
{ B{ } } [ B{ } binary [ contents ] with-byte-reader ] unit-test
! See http://factorcode.org/license.txt for BSD license.
USING: alien.data destructors io io.streams.memory kernel libc
tools.test ;
-IN: io.streams.memory.tests
{ 1 2 3 } [
B{ 1 2 3 } <memory-stream>
USING: continuations kernel math math.functions math.order
math.private namespaces prettyprint prettyprint.config random
sequences tools.test ;
-IN: math.integers.tests
10 number-base [
[ "-8" ] [ -8 unparse ] unit-test
-USING: kernel layouts literals math math.parser.private sequences
-strings tools.test ;
-IN: math.parser
+USING: kernel layouts literals math math.parser
+math.parser.private sequences strings tools.test ;
+IN: math.parser.tests
{ f }
[ f string>number ]
USING: lexer namespaces parser.notes source-files tools.test ;
-IN: parser.notes.tests
{ } [ f lexer set f current-source-file set "Hello world" note. ] unit-test
USING: assocs compiler.errors compiler.units definitions
namespaces tools.test words ;
-IN: source-files.errors.tests
DEFER: forget-test