Merge branch 'master' of git://factorcode.org/git/factor

db4
Eduardo Cavazos 2008-03-02 00:34:30 -06:00
commit cf23dab9d5
227 changed files with 369 additions and 375 deletions

View File

@ -1,4 +1,4 @@
IN: temporary
IN: alien.tests
USING: alien alien.accessors byte-arrays arrays kernel
kernel.private namespaces tools.test sequences libc math system
prettyprint ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: alien.c-types.tests
USING: alien alien.syntax alien.c-types kernel tools.test
sequences system libc ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: alien.compiler.tests
USING: alien alien.c-types alien.syntax compiler kernel
namespaces namespaces tools.test sequences inference words
arrays parser quotations continuations inference.backend effects

View File

@ -1,4 +1,4 @@
IN: temporary
IN: alien.structs.tests
USING: alien alien.syntax alien.c-types kernel tools.test
sequences system libc words vocabs namespaces ;

View File

@ -1,6 +1,6 @@
USING: arrays kernel sequences sequences.private growable
tools.test vectors layouts system math vectors.private ;
IN: temporary
IN: arrays.tests
[ -2 { "a" "b" "c" } nth ] must-fail
[ 10 { "a" "b" "c" } nth ] must-fail

View File

@ -1,4 +1,4 @@
IN: temporary
IN: assocs.tests
USING: kernel math namespaces tools.test vectors sequences
sequences.private hashtables io prettyprint assocs
continuations ;

View File

@ -1,6 +1,6 @@
USING: sequences arrays bit-arrays kernel tools.test math
random ;
IN: temporary
IN: bit-arrays.tests
[ 100 ] [ 100 <bit-array> length ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: bit-vectors.tests
USING: tools.test bit-vectors vectors sequences kernel math ;
[ 0 ] [ 123 <bit-vector> length ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: bootstrap.image.tests
USING: bootstrap.image bootstrap.image.private tools.test ;
\ ' must-infer

View File

@ -1,4 +1,4 @@
IN: temporary
IN: boxes.tests
USING: boxes namespaces tools.test ;
[ ] [ <box> "b" set ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: byte-arrays.tests
USING: tools.test byte-arrays ;
[ B{ 1 2 3 0 0 0 } ] [ 6 B{ 1 2 3 } resize-byte-array ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: byte-vectors.tests
USING: tools.test byte-vectors vectors sequences kernel ;
[ 0 ] [ 123 <byte-vector> length ] unit-test

View File

@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint sequences strings
tools.test vectors words quotations classes io.streams.string
classes.private classes.union classes.mixin classes.predicate
vectors definitions source-files compiler.units ;
IN: temporary
IN: classes.tests
H{ } "s" set
@ -62,7 +62,7 @@ UNION: bah fixnum alien ;
[ bah ] [ \ bah? "predicating" word-prop ] unit-test
! Test generic see and parsing
[ "USING: alien math ;\nIN: temporary\nUNION: bah fixnum alien ;\n" ]
[ "USING: alien math ;\nIN: classes.tests\nUNION: bah fixnum alien ;\n" ]
[ [ \ bah see ] with-string-writer ] unit-test
! Test redefinition of classes
@ -78,7 +78,7 @@ M: union-1 generic-update-test drop "union-1" ;
[ union-1 ] [ fixnum float class-or ] unit-test
"IN: temporary USE: math USE: arrays UNION: union-1 rational array ;" eval
"IN: classes.tests USE: math USE: arrays UNION: union-1 rational array ;" eval
[ t ] [ bignum union-1 class< ] unit-test
[ f ] [ union-1 number class< ] unit-test
@ -86,7 +86,7 @@ M: union-1 generic-update-test drop "union-1" ;
[ object ] [ fixnum float class-or ] unit-test
"IN: temporary USE: math PREDICATE: integer union-1 even? ;" eval
"IN: classes.tests USE: math PREDICATE: integer union-1 even? ;" eval
[ f ] [ union-1 union-class? ] unit-test
[ t ] [ union-1 predicate-class? ] unit-test
@ -126,7 +126,7 @@ INSTANCE: integer mx1
[ t ] [ mx1 integer class< ] unit-test
[ t ] [ mx1 number class< ] unit-test
"IN: temporary USE: arrays INSTANCE: array mx1" eval
"IN: classes.tests USE: arrays INSTANCE: array mx1" eval
[ t ] [ array mx1 class< ] unit-test
[ f ] [ mx1 number class< ] unit-test
@ -157,7 +157,7 @@ UNION: redefine-bug-2 redefine-bug-1 quotation ;
[ t ] [ quotation redefine-bug-2 class< ] unit-test
[ redefine-bug-2 ] [ fixnum quotation class-or ] unit-test
[ ] [ "IN: temporary USE: math UNION: redefine-bug-1 bignum ;" eval ] unit-test
[ ] [ "IN: classes.tests USE: math UNION: redefine-bug-1 bignum ;" eval ] unit-test
[ t ] [ bignum redefine-bug-1 class< ] unit-test
[ f ] [ fixnum redefine-bug-2 class< ] unit-test
@ -185,7 +185,7 @@ DEFER: mixin-forget-test-g
[ ] [
{
"USING: sequences ;"
"IN: temporary"
"IN: classes.tests"
"MIXIN: mixin-forget-test"
"INSTANCE: sequence mixin-forget-test"
"GENERIC: mixin-forget-test-g ( x -- y )"
@ -200,7 +200,7 @@ DEFER: mixin-forget-test-g
[ ] [
{
"USING: hashtables ;"
"IN: temporary"
"IN: classes.tests"
"MIXIN: mixin-forget-test"
"INSTANCE: hashtable mixin-forget-test"
"GENERIC: mixin-forget-test-g ( x -- y )"

View File

@ -1,4 +1,4 @@
IN: temporary
IN: combinators.tests
USING: alien strings kernel math tools.test io prettyprint
namespaces combinators words ;

View File

@ -1,5 +1,5 @@
USING: namespaces tools.test kernel command-line ;
IN: temporary
IN: command-line.tests
[
[ f ] [ "-no-user-init" cli-arg ] unit-test

View File

@ -1,6 +1,6 @@
USING: tools.test quotations math kernel sequences
assocs namespaces compiler.units ;
IN: temporary
IN: compiler.tests
[ 3 ] [ 5 [ [ 2 - ] curry call ] compile-call ] unit-test
[ 3 ] [ [ 5 [ 2 - ] curry call ] compile-call ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: compiler.tests
USING: compiler.units kernel kernel.private memory math
math.private tools.test math.floats.private ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: compiler.tests
USING: arrays compiler.units kernel kernel.private math
math.constants math.private sequences strings tools.test words
continuations sequences.private hashtables.private byte-arrays

View File

@ -1,7 +1,7 @@
USING: compiler.units tools.test kernel kernel.private
sequences.private math.private math combinators strings
alien arrays memory ;
IN: temporary
IN: compiler.tests
! Test empty word
[ ] [ [ ] compile-call ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: compiler.tests
USING: compiler tools.test namespaces sequences
kernel.private kernel math continuations continuations.private
words splitting sorting ;

View File

@ -1,5 +1,5 @@
! Testing templates machinery without compiling anything
IN: temporary
IN: compiler.tests
USING: compiler generator generator.registers
generator.registers.private tools.test namespaces sequences
words kernel math effects definitions compiler.units ;

View File

@ -4,7 +4,7 @@ hashtables.private math.private namespaces sequences
sequences.private tools.test namespaces.private slots.private
sequences.private byte-arrays alien alien.accessors layouts
words definitions compiler.units io combinators ;
IN: temporary
IN: compiler.tests
! Oops!
[ 5000 ] [ [ 5000 ] compile-call ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: compiler.tests
USING: kernel tools.test compiler.units ;
TUPLE: color red green blue ;

View File

@ -1,7 +1,7 @@
USING: kernel math namespaces io tools.test sequences vectors
continuations debugger parser memory arrays words
kernel.private ;
IN: temporary
IN: continuations.tests
: (callcc1-test)
swap 1- tuck swap ?push

View File

@ -1,4 +1,4 @@
IN: temporary
IN: cpu.arm.assembler.tests
USING: assembler-arm math test namespaces sequences kernel
quotations ;

View File

@ -1,5 +1,5 @@
USING: cpu.x86.assembler kernel tools.test namespaces ;
IN: temporary
IN: cpu.x86.assembler.tests
[ { HEX: 49 HEX: 89 HEX: 04 HEX: 24 } ] [ [ R12 [] RAX MOV ] { } make ] unit-test
[ { HEX: 49 HEX: 8b HEX: 06 } ] [ [ RAX R14 [] MOV ] { } make ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: debugger.tests
USING: debugger kernel continuations tools.test ;
[ ] [ [ drop ] [ error. ] recover ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: definitions.tests
USING: tools.test generic kernel definitions sequences
compiler.units ;

View File

@ -1,7 +1,7 @@
USING: dlists dlists.private kernel tools.test random assocs
hashtables sequences namespaces sorting debugger io prettyprint
math ;
IN: temporary
IN: dlists.tests
[ t ] [ <dlist> dlist-empty? ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: effects.tests
USING: effects tools.test ;
[ t ] [ 1 1 <effect> 2 2 <effect> effect<= ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: float-arrays.tests
USING: float-arrays tools.test ;
[ F{ 1.0 1.0 1.0 } ] [ 3 1.0 <float-array> ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: float-vectors.tests
USING: tools.test float-vectors vectors sequences kernel ;
[ 0 ] [ 123 <float-vector> length ] unit-test

View File

@ -3,7 +3,7 @@ generic.math assocs hashtables io kernel math namespaces parser
prettyprint sequences strings tools.test vectors words
quotations classes continuations layouts classes.union sorting
compiler.units ;
IN: temporary
IN: generic.tests
GENERIC: foobar ( x -- y )
M: object foobar drop "Hello world" ;
@ -87,11 +87,11 @@ M: number union-containment drop 2 ;
[ 2 ] [ 1.0 union-containment ] unit-test
! Testing recovery from bad method definitions
"IN: temporary GENERIC: unhappy ( x -- x )" eval
"IN: generic.tests GENERIC: unhappy ( x -- x )" eval
[
"IN: temporary M: dictionary unhappy ;" eval
"IN: generic.tests M: dictionary unhappy ;" eval
] must-fail
[ ] [ "IN: temporary GENERIC: unhappy ( x -- x )" eval ] unit-test
[ ] [ "IN: generic.tests GENERIC: unhappy ( x -- x )" eval ] unit-test
GENERIC# complex-combination 1 ( a b -- c )
M: string complex-combination drop ;
@ -192,12 +192,12 @@ SYMBOL: redefinition-test-generic
TUPLE: redefinition-test-tuple ;
"IN: temporary M: redefinition-test-tuple redefinition-test-generic ;" eval
"IN: generic.tests M: redefinition-test-tuple redefinition-test-generic ;" eval
[ t ] [
[
redefinition-test-generic ,
"IN: temporary TUPLE: redefinition-test-tuple ;" eval
"IN: generic.tests TUPLE: redefinition-test-tuple ;" eval
redefinition-test-generic ,
] { } make all-equal?
] unit-test

View File

@ -1,6 +1,6 @@
USING: math sequences classes growable tools.test kernel
layouts ;
IN: temporary
IN: growable.tests
! erg found this one
[ fixnum ] [

View File

@ -1,4 +1,4 @@
IN: temporary
IN: hashtables.tests
USING: kernel math namespaces tools.test vectors sequences
sequences.private hashtables io prettyprint assocs
continuations ;

View File

@ -3,7 +3,7 @@
USING: arrays kernel math namespaces tools.test
heaps heaps.private math.parser random assocs sequences sorting ;
IN: temporary
IN: heaps.tests
[ <min-heap> heap-pop ] must-fail
[ <max-heap> heap-pop ] must-fail

View File

@ -1,4 +1,4 @@
IN: temporary
IN: inference.class.tests
USING: arrays math.private kernel math compiler inference
inference.dataflow optimizer tools.test kernel.private generic
sequences words inference.class quotations alien

View File

@ -6,7 +6,7 @@ continuations generic.standard sorting assocs definitions
prettyprint io inspector tuples classes.union classes.predicate
debugger threads.private io.streams.string io.timeouts
io.thread sequences.private ;
IN: temporary
IN: inference.tests
{ 0 2 } [ 2 "Hello" ] must-infer-as
{ 1 2 } [ dup ] must-infer-as

View File

@ -1,4 +1,4 @@
IN: temporary
IN: inference.state.tests
USING: tools.test inference.state words ;
SYMBOL: a

View File

@ -1,4 +1,4 @@
IN: temporary
IN: inference.transforms.tests
USING: sequences inference.transforms tools.test math kernel
quotations inference ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: init.tests
USING: init namespaces sequences math tools.test kernel ;
[ t ] [

View File

@ -1,6 +1,6 @@
USING: kernel tools.test math namespaces prettyprint
sequences inspector io.streams.string ;
IN: temporary
IN: inspector.tests
[ 1 2 3 ] describe
f describe

View File

@ -1,4 +1,4 @@
IN: temporary
IN: io.backend.tests
USING: tools.test io.backend kernel ;
[ ] [ "a" normalize-pathname drop ] unit-test

View File

@ -1,5 +1,5 @@
USING: io.binary tools.test ;
IN: temporary
IN: io.binary.tests
[ "\0\0\u000004\u0000d2" ] [ 1234 4 >be ] unit-test
[ "\u0000d2\u000004\0\0" ] [ 1234 4 >le ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: io.files.tests
USING: tools.test io.files io threads kernel continuations ;
[ "passwd" ] [ "/etc/passwd" file-name ] unit-test

View File

@ -1,10 +1,10 @@
USING: arrays io io.files kernel math parser strings system
tools.test words namespaces ;
IN: temporary
IN: io.tests
[ f ] [
"resource:/core/io/test/no-trailing-eol.factor" run-file
"foo" "temporary" lookup
"foo" "io.tests" lookup
] unit-test
: <resource-reader> ( resource -- stream )

View File

@ -1,5 +1,5 @@
USING: tools.test io.files io io.streams.c ;
IN: temporary
IN: io.streams.c.tests
[ "hello world" ] [
"test.txt" temp-file [

View File

@ -1,5 +1,5 @@
USING: io.streams.duplex io kernel continuations tools.test ;
IN: temporary
IN: io.streams.duplex.tests
! Test duplex stream close behavior
TUPLE: closing-stream closed? ;

View File

@ -1,6 +1,6 @@
USING: io.streams.lines io.files io.streams.string io
tools.test kernel ;
IN: temporary
IN: io.streams.lines.tests
: <resource-reader> ( resource -- stream )
resource-path <file-reader> ;

View File

@ -1,3 +1,3 @@
USING: io io.streams.string io.streams.nested kernel math
namespaces io.styles tools.test ;
IN: temporary
IN: io.streams.nested.tests

View File

@ -1,5 +1,5 @@
USING: io.streams.string io kernel arrays namespaces tools.test ;
IN: temporary
IN: io.streams.string.tests
[ "line 1" CHAR: l ]
[

View File

@ -1,4 +1,4 @@
IN: temporary
IN: io.tests
USE: math
: foo 2 2 + ;
FORGET: foo

View File

@ -1,7 +1,7 @@
USING: arrays byte-arrays kernel kernel.private math memory
namespaces sequences tools.test math.private quotations
continuations prettyprint io.streams.string debugger assocs ;
IN: temporary
IN: kernel.tests
[ 0 ] [ f size ] unit-test
[ t ] [ [ \ = \ = ] all-equal? ] unit-test

View File

@ -1,7 +1,7 @@
USING: io io.streams.string io.streams.duplex listener
tools.test parser math namespaces continuations vocabs kernel
compiler.units ;
IN: temporary
IN: listener.tests
: hello "Hi" print ; parsing
@ -45,6 +45,6 @@ IN: temporary
] unit-test
[ ] [
"IN: temporary : hello\n\"world\" ;" parse-interactive
"IN: listener.tests : hello\n\"world\" ;" parse-interactive
drop
] unit-test

View File

@ -1,5 +1,5 @@
USING: math math.bitfields tools.test kernel words ;
IN: temporary
IN: math.bitfields.tests
[ 0 ] [ { } bitfield ] unit-test
[ 256 ] [ 1 { 8 } bitfield ] unit-test

View File

@ -1,5 +1,5 @@
USING: kernel math math.constants tools.test sequences ;
IN: temporary
IN: math.floats.tests
[ t ] [ 0.0 float? ] unit-test
[ t ] [ 3.1415 number? ] unit-test

View File

@ -1,6 +1,6 @@
USING: kernel math namespaces prettyprint
math.private continuations tools.test sequences ;
IN: temporary
IN: math.integers.tests
[ "-8" ] [ -8 unparse ] unit-test

View File

@ -1,6 +1,6 @@
USING: math.intervals kernel sequences words math arrays
prettyprint tools.test random vocabs ;
IN: temporary
IN: math.intervals.tests
[ T{ interval f { 1 t } { 2 t } } ] [ 1 2 [a,b] ] unit-test

View File

@ -1,5 +1,5 @@
USING: kernel math namespaces tools.test ;
IN: temporary
IN: math.tests
[ ] [ 5 [ ] times ] unit-test
[ ] [ 0 [ ] times ] unit-test

View File

@ -1,5 +1,5 @@
USING: kernel math math.parser sequences tools.test ;
IN: temporary
IN: math.parser.tests
[ f ]
[ f string>number ]

View File

@ -1,6 +1,6 @@
USING: generic kernel kernel.private math memory prettyprint
sequences tools.test words namespaces layouts classes ;
IN: temporary
IN: memory.tests
TUPLE: testing x y z ;

View File

@ -1,5 +1,5 @@
USING: mirrors tools.test assocs kernel arrays ;
IN: temporary
IN: mirrors.tests
TUPLE: foo bar baz ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: namespaces.tests
USING: kernel namespaces tools.test words ;
H{ } clone "test-namespace" set

View File

@ -1,4 +1,4 @@
IN: temporary
IN: optimizer.control.tests
USING: tools.test optimizer.control combinators kernel
sequences inference.dataflow math inference classes strings
optimizer ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: optimizer.def-use.tests
USING: inference inference.dataflow optimizer optimizer.def-use
namespaces assocs kernel sequences math tools.test words ;

View File

@ -3,7 +3,7 @@ kernel.private math optimizer prettyprint sequences sbufs
strings tools.test vectors words sequences.private quotations
optimizer.backend classes inference.dataflow tuples.private
continuations growable optimizer.inlining namespaces hints ;
IN: temporary
IN: optimizer.tests
[ H{ { 1 5 } { 3 4 } { 2 5 } } ] [
H{ { 1 2 } { 3 4 } } H{ { 2 5 } } union*

View File

@ -2,7 +2,7 @@ USING: arrays math parser tools.test kernel generic words
io.streams.string namespaces classes effects source-files
assocs sequences strings io.files definitions continuations
sorting tuples compiler.units debugger ;
IN: temporary
IN: parser.tests
[
[ 1 [ 2 [ 3 ] 4 ] 5 ]
@ -23,7 +23,7 @@ IN: temporary
[ "hello world" ]
[
"IN: temporary : hello \"hello world\" ;"
"IN: parser.tests : hello \"hello world\" ;"
eval "USE: temporary hello" eval
] unit-test
@ -51,7 +51,7 @@ IN: temporary
: effect-parsing-test ( a b -- c ) + ;
[ t ] [
"effect-parsing-test" "temporary" lookup
"effect-parsing-test" "parser.tests" lookup
\ effect-parsing-test eq?
] unit-test
@ -64,24 +64,24 @@ IN: temporary
[ \ baz "declared-effect" word-prop effect-terminated? ]
unit-test
[ ] [ "IN: temporary USE: math : effect-parsing-test ( a b -- d ) - ;" eval ] unit-test
[ ] [ "IN: parser.tests USE: math : effect-parsing-test ( a b -- d ) - ;" eval ] unit-test
[ t ] [
"effect-parsing-test" "temporary" lookup
"effect-parsing-test" "parser.tests" lookup
\ effect-parsing-test eq?
] unit-test
[ T{ effect f { "a" "b" } { "d" } f } ]
[ \ effect-parsing-test "declared-effect" word-prop ] unit-test
[ ] [ "IN: temporary : effect-parsing-test ;" eval ] unit-test
[ ] [ "IN: parser.tests : effect-parsing-test ;" eval ] unit-test
[ f ] [ \ effect-parsing-test "declared-effect" word-prop ] unit-test
! Funny bug
[ 2 ] [ "IN: temporary : \0. 2 ; \0." eval ] unit-test
[ 2 ] [ "IN: parser.tests : \0. 2 ; \0." eval ] unit-test
[ "IN: temporary : missing-- ( a b ) ;" eval ] must-fail
[ "IN: parser.tests : missing-- ( a b ) ;" eval ] must-fail
! These should throw errors
[ "HEX: zzz" eval ] must-fail
@ -102,71 +102,71 @@ IN: temporary
] unit-test
DEFER: foo
"IN: temporary USING: math prettyprint ; : foo 2 2 + . ; parsing" eval
"IN: parser.tests USING: math prettyprint ; : foo 2 2 + . ; parsing" eval
[ ] [ "USE: temporary foo" eval ] unit-test
"IN: temporary USING: math prettyprint ; : foo 2 2 + . ;" eval
"IN: parser.tests USING: math prettyprint ; : foo 2 2 + . ;" eval
[ t ] [
"USE: temporary \\ foo" eval
"foo" "temporary" lookup eq?
"foo" "parser.tests" lookup eq?
] unit-test
! Test smudging
[ 1 ] [
"IN: temporary : smudge-me ;" <string-reader> "foo"
"IN: parser.tests : smudge-me ;" <string-reader> "foo"
parse-stream drop
"foo" source-file source-file-definitions first assoc-size
] unit-test
[ t ] [ "smudge-me" "temporary" lookup >boolean ] unit-test
[ t ] [ "smudge-me" "parser.tests" lookup >boolean ] unit-test
[ ] [
"IN: temporary : smudge-me-more ;" <string-reader> "foo"
"IN: parser.tests : smudge-me-more ;" <string-reader> "foo"
parse-stream drop
] unit-test
[ t ] [ "smudge-me-more" "temporary" lookup >boolean ] unit-test
[ f ] [ "smudge-me" "temporary" lookup >boolean ] unit-test
[ t ] [ "smudge-me-more" "parser.tests" lookup >boolean ] unit-test
[ f ] [ "smudge-me" "parser.tests" lookup >boolean ] unit-test
[ 3 ] [
"IN: temporary USING: math strings ; GENERIC: smudge-me M: integer smudge-me ; M: string smudge-me ;" <string-reader> "foo"
"IN: parser.tests USING: math strings ; GENERIC: smudge-me M: integer smudge-me ; M: string smudge-me ;" <string-reader> "foo"
parse-stream drop
"foo" source-file source-file-definitions first assoc-size
] unit-test
[ 1 ] [
"IN: temporary USING: arrays ; M: array smudge-me ;" <string-reader> "bar"
"IN: parser.tests USING: arrays ; M: array smudge-me ;" <string-reader> "bar"
parse-stream drop
"bar" source-file source-file-definitions first assoc-size
] unit-test
[ 2 ] [
"IN: temporary USING: math strings ; GENERIC: smudge-me M: integer smudge-me ;" <string-reader> "foo"
"IN: parser.tests USING: math strings ; GENERIC: smudge-me M: integer smudge-me ;" <string-reader> "foo"
parse-stream drop
"foo" source-file source-file-definitions first assoc-size
] unit-test
[ t ] [
array "smudge-me" "temporary" lookup order memq?
array "smudge-me" "parser.tests" lookup order memq?
] unit-test
[ t ] [
integer "smudge-me" "temporary" lookup order memq?
integer "smudge-me" "parser.tests" lookup order memq?
] unit-test
[ f ] [
string "smudge-me" "temporary" lookup order memq?
string "smudge-me" "parser.tests" lookup order memq?
] unit-test
[ ] [
"IN: temporary USE: math 2 2 +" <string-reader> "a"
"IN: parser.tests USE: math 2 2 +" <string-reader> "a"
parse-stream drop
] unit-test
@ -175,7 +175,7 @@ IN: temporary
] unit-test
[ ] [
"IN: temporary USE: math 2 2 -" <string-reader> "a"
"IN: parser.tests USE: math 2 2 -" <string-reader> "a"
parse-stream drop
] unit-test
@ -186,7 +186,7 @@ IN: temporary
[ ] [
"a" source-files get delete-at
2 [
"IN: temporary DEFER: x : y x ; : x y ;"
"IN: parser.tests DEFER: x : y x ; : x y ;"
<string-reader> "a" parse-stream drop
] times
] unit-test
@ -194,19 +194,19 @@ IN: temporary
"a" source-files get delete-at
[
"IN: temporary : x ; : y 3 throw ; this is an error"
"IN: parser.tests : x ; : y 3 throw ; this is an error"
<string-reader> "a" parse-stream
] [ parse-error? ] must-fail-with
[ t ] [
"y" "temporary" lookup >boolean
"y" "parser.tests" lookup >boolean
] unit-test
[ f ] [
"IN: temporary : x ;"
"IN: parser.tests : x ;"
<string-reader> "a" parse-stream drop
"y" "temporary" lookup
"y" "parser.tests" lookup
] unit-test
! Test new forward definition logic
@ -269,81 +269,81 @@ IN: temporary
] unit-test
[ ] [
"IN: temporary : <bogus-error> ; : bogus <bogus-error> ;"
"IN: parser.tests : <bogus-error> ; : bogus <bogus-error> ;"
<string-reader> "bogus-error" parse-stream drop
] unit-test
[ ] [
"IN: temporary TUPLE: bogus-error ; C: <bogus-error> bogus-error : bogus <bogus-error> ;"
"IN: parser.tests TUPLE: bogus-error ; C: <bogus-error> bogus-error : bogus <bogus-error> ;"
<string-reader> "bogus-error" parse-stream drop
] unit-test
! Problems with class predicates -vs- ordinary words
[ ] [
"IN: temporary TUPLE: killer ;"
"IN: parser.tests TUPLE: killer ;"
<string-reader> "removing-the-predicate" parse-stream drop
] unit-test
[ ] [
"IN: temporary GENERIC: killer? ( a -- b )"
"IN: parser.tests GENERIC: killer? ( a -- b )"
<string-reader> "removing-the-predicate" parse-stream drop
] unit-test
[ t ] [
"killer?" "temporary" lookup >boolean
"killer?" "parser.tests" lookup >boolean
] unit-test
[
"IN: temporary TUPLE: another-pred-test ; GENERIC: another-pred-test?"
"IN: parser.tests TUPLE: another-pred-test ; GENERIC: another-pred-test?"
<string-reader> "removing-the-predicate" parse-stream
] [ [ redefine-error? ] is? ] must-fail-with
[
"IN: temporary TUPLE: class-redef-test ; TUPLE: class-redef-test ;"
"IN: parser.tests TUPLE: class-redef-test ; TUPLE: class-redef-test ;"
<string-reader> "redefining-a-class-1" parse-stream
] [ [ redefine-error? ] is? ] must-fail-with
[ ] [
"IN: temporary TUPLE: class-redef-test ; SYMBOL: class-redef-test"
"IN: parser.tests TUPLE: class-redef-test ; SYMBOL: class-redef-test"
<string-reader> "redefining-a-class-2" parse-stream drop
] unit-test
[
"IN: temporary TUPLE: class-redef-test ; SYMBOL: class-redef-test : class-redef-test ;"
"IN: parser.tests TUPLE: class-redef-test ; SYMBOL: class-redef-test : class-redef-test ;"
<string-reader> "redefining-a-class-3" parse-stream drop
] [ [ redefine-error? ] is? ] must-fail-with
[ ] [
"IN: temporary TUPLE: class-fwd-test ;"
"IN: parser.tests TUPLE: class-fwd-test ;"
<string-reader> "redefining-a-class-3" parse-stream drop
] unit-test
[
"IN: temporary \\ class-fwd-test"
"IN: parser.tests \\ class-fwd-test"
<string-reader> "redefining-a-class-3" parse-stream drop
] [ [ no-word? ] is? ] must-fail-with
[ ] [
"IN: temporary TUPLE: class-fwd-test ; SYMBOL: class-fwd-test"
"IN: parser.tests TUPLE: class-fwd-test ; SYMBOL: class-fwd-test"
<string-reader> "redefining-a-class-3" parse-stream drop
] unit-test
[
"IN: temporary \\ class-fwd-test"
"IN: parser.tests \\ class-fwd-test"
<string-reader> "redefining-a-class-3" parse-stream drop
] [ [ no-word? ] is? ] must-fail-with
[
"IN: temporary : foo ; TUPLE: foo ;"
"IN: parser.tests : foo ; TUPLE: foo ;"
<string-reader> "redefining-a-class-4" parse-stream drop
] [ [ redefine-error? ] is? ] must-fail-with
[ ] [
"IN: temporary : foo ( x y -- z ) 1 2 ; : bar ( a -- b ) ;" eval
"IN: parser.tests : foo ( x y -- z ) 1 2 ; : bar ( a -- b ) ;" eval
] unit-test
[
"IN: temporary : foo ( x y -- z) 1 2 ; : bar ( a -- b ) ;" eval
"IN: parser.tests : foo ( x y -- z) 1 2 ; : bar ( a -- b ) ;" eval
] must-fail
] with-file-vocabs
@ -354,7 +354,7 @@ IN: temporary
DEFER: ~b
"IN: temporary : ~b ~a ;" <string-reader>
"IN: parser.tests : ~b ~a ;" <string-reader>
"smudgy" parse-stream drop
: ~c ;
@ -389,43 +389,43 @@ IN: temporary
] with-scope
[ ] [
"IN: temporary USE: kernel PREDICATE: object foo ( x -- y ) ;" eval
"IN: parser.tests USE: kernel PREDICATE: object foo ( x -- y ) ;" eval
] unit-test
[ t ] [
"foo?" "temporary" lookup word eq?
"foo?" "parser.tests" lookup word eq?
] unit-test
[ ] [
"IN: temporary TUPLE: foo ; GENERIC: foo"
"IN: parser.tests TUPLE: foo ; GENERIC: foo"
<string-reader> "redefining-a-class-5" parse-stream drop
] unit-test
[ ] [
"IN: temporary M: f foo ;"
"IN: parser.tests M: f foo ;"
<string-reader> "redefining-a-class-6" parse-stream drop
] unit-test
[ f ] [ f "foo" "temporary" lookup execute ] unit-test
[ f ] [ f "foo" "parser.tests" lookup execute ] unit-test
[ ] [
"IN: temporary TUPLE: foo ; GENERIC: foo"
"IN: parser.tests TUPLE: foo ; GENERIC: foo"
<string-reader> "redefining-a-class-5" parse-stream drop
] unit-test
[ f ] [ f "foo" "temporary" lookup execute ] unit-test
[ f ] [ f "foo" "parser.tests" lookup execute ] unit-test
[ ] [
"IN: temporary TUPLE: foo ; GENERIC: foo"
"IN: parser.tests TUPLE: foo ; GENERIC: foo"
<string-reader> "redefining-a-class-7" parse-stream drop
] unit-test
[ ] [
"IN: temporary TUPLE: foo ;"
"IN: parser.tests TUPLE: foo ;"
<string-reader> "redefining-a-class-7" parse-stream drop
] unit-test
[ t ] [ "foo" "temporary" lookup symbol? ] unit-test
[ t ] [ "foo" "parser.tests" lookup symbol? ] unit-test
[ "resource:core/parser/test/assert-depth.factor" run-file ]
[ relative-overflow-stack { 1 2 3 } sequence= ]

View File

@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint prettyprint.config
prettyprint.sections sequences tools.test vectors words
effects splitting generic.standard prettyprint.private
continuations generic compiler.units tools.walker ;
IN: temporary
IN: prettyprint.tests
[ "4" ] [ 4 unparse ] unit-test
[ "1.0" ] [ 1.0 unparse ] unit-test
@ -73,12 +73,12 @@ unit-test
: foo ( a -- b ) dup * ; inline
[ "USING: kernel math ;\nIN: temporary\n: foo ( a -- b ) dup * ; inline\n" ]
[ "USING: kernel math ;\nIN: prettyprint.tests\n: foo ( a -- b ) dup * ; inline\n" ]
[ [ \ foo see ] with-string-writer ] unit-test
: bar ( x -- y ) 2 + ;
[ "USING: math ;\nIN: temporary\n: bar ( x -- y ) 2 + ;\n" ]
[ "USING: math ;\nIN: prettyprint.tests\n: bar ( x -- y ) 2 + ;\n" ]
[ [ \ bar see ] with-string-writer ] unit-test
: blah
@ -115,14 +115,14 @@ unit-test
[
[ parse-fresh drop ] with-compilation-unit
[
"temporary" lookup see
"prettyprint.tests" lookup see
] with-string-writer "\n" split 1 head*
] keep =
] with-scope ;
: method-test
{
"IN: temporary"
"IN: prettyprint.tests"
"GENERIC: method-layout"
""
"USING: math temporary ;"
@ -147,7 +147,7 @@ unit-test
: retain-stack-test
{
"USING: io kernel sequences words ;"
"IN: temporary"
"IN: prettyprint.tests"
": retain-stack-layout ( x -- )"
" dup stream-readln stream-readln"
" >r [ define ] map r>"
@ -161,7 +161,7 @@ unit-test
: soft-break-test
{
"USING: kernel math sequences strings ;"
"IN: temporary"
"IN: prettyprint.tests"
": soft-break-layout ( x y -- ? )"
" over string? ["
" over hashcode over hashcode number="
@ -176,7 +176,7 @@ unit-test
: another-retain-layout-test
{
"USING: kernel sequences ;"
"IN: temporary"
"IN: prettyprint.tests"
": another-retain-layout ( seq1 seq2 quot -- newseq )"
" -rot 2dup dupd min-length [ each drop roll ] map"
" >r 3drop r> ; inline"
@ -189,7 +189,7 @@ unit-test
: another-soft-break-test
{
"USING: namespaces parser sequences ;"
"IN: temporary"
"IN: prettyprint.tests"
": another-soft-break-layout ( node -- quot )"
" parse-error-file"
" [ <reversed> \"hello world foo\" add ] [ ] make ;"
@ -203,7 +203,7 @@ unit-test
: string-layout
{
"USING: io kernel parser ;"
"IN: temporary"
"IN: prettyprint.tests"
": string-layout-test ( error -- )"
" \"Expected \" write dup unexpected-want expected>string write"
" \" but got \" write unexpected-got expected>string print ;"
@ -224,7 +224,7 @@ unit-test
: final-soft-break-test
{
"USING: kernel sequences ;"
"IN: temporary"
"IN: prettyprint.tests"
": final-soft-break-layout ( class dim -- view )"
" >r \"alloc\" send 0 0 r>"
" first2 <NSRect>"
@ -240,7 +240,7 @@ unit-test
: narrow-test
{
"USING: arrays combinators continuations kernel sequences ;"
"IN: temporary"
"IN: prettyprint.tests"
": narrow-layout ( obj -- )"
" {"
" { [ dup continuation? ] [ append ] }"
@ -255,7 +255,7 @@ unit-test
: another-narrow-test
{
"IN: temporary"
"IN: prettyprint.tests"
": another-narrow-layout ( -- obj )"
" H{"
" { 1 2 }"
@ -274,10 +274,10 @@ unit-test
: class-see-test
{
"IN: temporary"
"IN: prettyprint.tests"
"TUPLE: class-see-layout ;"
""
"IN: temporary"
"IN: prettyprint.tests"
"GENERIC: class-see-layout ( x -- y )"
""
"USING: temporary ;"
@ -292,9 +292,9 @@ unit-test
! Regression
[ t ] [
"IN: temporary\nGENERIC: generic-decl-test ( a -- b ) flushable\n"
"IN: prettyprint.tests\nGENERIC: generic-decl-test ( a -- b ) flushable\n"
dup eval
"generic-decl-test" "temporary" lookup
"generic-decl-test" "prettyprint.tests" lookup
[ see ] with-string-writer =
] unit-test

View File

@ -1,5 +1,5 @@
USING: math kernel quotations tools.test sequences ;
IN: temporary
IN: quotations.tests
[ [ 3 ] ] [ 3 [ ] curry ] unit-test
[ [ \ + ] ] [ \ + [ ] curry ] unit-test

View File

@ -1,6 +1,6 @@
USING: kernel math namespaces sequences sbufs strings
tools.test classes ;
IN: temporary
IN: sbufs.tests
[ 5 ] [ "Hello" >sbuf length ] unit-test

View File

@ -1,7 +1,7 @@
USING: arrays kernel math namespaces sequences kernel.private
sequences.private strings sbufs tools.test vectors bit-arrays
generic ;
IN: temporary
IN: sequences.tests
[ V{ 1 2 3 4 } ] [ 1 5 dup <slice> >vector ] unit-test
[ 3 ] [ 1 4 dup <slice> length ] unit-test

View File

@ -1,6 +1,6 @@
USING: sorting sequences kernel math random tools.test
vectors ;
IN: temporary
IN: sorting.tests
[ [ ] ] [ [ ] natural-sort ] unit-test

View File

@ -1,5 +1,5 @@
USING: splitting tools.test ;
IN: temporary
IN: splitting.tests
[ { 1 2 3 } 0 group ] must-fail

View File

@ -1,6 +1,6 @@
USING: continuations kernel math namespaces strings sbufs
tools.test sequences vectors arrays ;
IN: temporary
IN: strings.tests
[ CHAR: b ] [ 1 >bignum "abc" nth ] unit-test

View File

@ -1,5 +1,5 @@
USING: math tools.test system prettyprint ;
IN: temporary
IN: system.tests
[ t ] [ cell integer? ] unit-test
[ t ] [ bootstrap-cell integer? ] unit-test

View File

@ -1,5 +1,5 @@
USING: namespaces io tools.test threads kernel ;
IN: temporary
IN: threads.tests
3 "x" set
namespace [ [ yield 2 "x" set ] bind ] curry "Test" spawn drop

View File

@ -3,7 +3,7 @@ math.constants parser sequences tools.test words assocs
namespaces quotations sequences.private classes continuations
generic.standard effects tuples tuples.private arrays vectors
strings compiler.units ;
IN: temporary
IN: tuples.tests
[ t ] [ \ tuple-class \ class class< ] unit-test
[ f ] [ \ class \ tuple-class class< ] unit-test
@ -45,19 +45,19 @@ C: <point> point
100 200 <point> "p" set
! Use eval to sequence parsing explicitly
"IN: temporary TUPLE: point x y z ;" eval
"IN: tuples.tests TUPLE: point x y z ;" eval
[ 100 ] [ "p" get point-x ] unit-test
[ 200 ] [ "p" get point-y ] unit-test
[ f ] [ "p" get "point-z" "temporary" lookup execute ] unit-test
[ f ] [ "p" get "point-z" "tuples.tests" lookup execute ] unit-test
300 "p" get "set-point-z" "temporary" lookup execute
300 "p" get "set-point-z" "tuples.tests" lookup execute
"IN: temporary TUPLE: point z y ;" eval
"IN: tuples.tests TUPLE: point z y ;" eval
[ "p" get point-x ] must-fail
[ 200 ] [ "p" get point-y ] unit-test
[ 300 ] [ "p" get "point-z" "temporary" lookup execute ] unit-test
[ 300 ] [ "p" get "point-z" "tuples.tests" lookup execute ] unit-test
TUPLE: predicate-test ;
@ -113,7 +113,7 @@ GENERIC: <yo-momma>
TUPLE: yo-momma ;
"IN: temporary C: <yo-momma> yo-momma" eval
"IN: tuples.tests C: <yo-momma> yo-momma" eval
[ f ] [ \ <yo-momma> generic? ] unit-test
@ -202,12 +202,12 @@ M: vector silly "z" ;
SYMBOL: not-a-tuple-class
[
"IN: temporary C: <not-a-tuple-class> not-a-tuple-class"
"IN: tuples.tests C: <not-a-tuple-class> not-a-tuple-class"
eval
] must-fail
[ t ] [
"not-a-tuple-class" "temporary" lookup symbol?
"not-a-tuple-class" "tuples.tests" lookup symbol?
] unit-test
! Missing check
@ -226,7 +226,7 @@ C: <erg's-reshape-problem> erg's-reshape-problem
{ set-erg's-reshape-problem-a }
\ erg's-reshape-problem construct ;
"IN: temporary TUPLE: erg's-reshape-problem a b c d e f ;" eval
"IN: tuples.tests TUPLE: erg's-reshape-problem a b c d e f ;" eval
[ ] [ 1 2 3 4 5 6 cons-test-2 "a" set ] unit-test
@ -235,7 +235,7 @@ C: <erg's-reshape-problem> erg's-reshape-problem
[ t ] [ 1 cons-test-3 array-capacity "a" get array-capacity = ] unit-test
[
"IN: temporary SYMBOL: not-a-class C: <not-a-class> not-a-class" eval
"IN: tuples.tests SYMBOL: not-a-class C: <not-a-class> not-a-class" eval
] [ [ check-tuple? ] is? ] must-fail-with
! Hardcore unit tests

View File

@ -1,7 +1,7 @@
USING: arrays kernel kernel.private math namespaces
sequences sequences.private strings tools.test vectors
continuations random growable classes ;
IN: temporary
IN: vectors.tests
[ ] [ 10 [ [ -1000000 <vector> ] ignore-errors ] times ] unit-test

View File

@ -1,5 +1,5 @@
! Unit tests for vocabs.loader vocabulary
IN: temporary
IN: vocabs.loader.tests
USING: vocabs.loader tools.test continuations vocabs math
kernel arrays sequences namespaces io.streams.string
parser source-files words assocs tuples definitions
@ -31,7 +31,7 @@ IN: vocabs.loader.test.2
MAIN: hello
IN: temporary
IN: vocabs.loader.tests
[ { 3 3 3 } ] [
"vocabs.loader.test.2" run

View File

@ -1,5 +1,5 @@
! Unit tests for vocabs vocabulary
USING: vocabs tools.test ;
IN: temporary
IN: vocabs.tests
[ f ] [ "kernel" vocab-main ] unit-test

View File

@ -1,13 +1,13 @@
USING: arrays generic assocs kernel math namespaces
sequences tools.test words definitions parser quotations
vocabs continuations tuples compiler.units io.streams.string ;
IN: temporary
IN: words.tests
[ 4 ] [
[
"poo" "temporary" create [ 2 2 + ] define
"poo" "words.tests" create [ 2 2 + ] define
] with-compilation-unit
"poo" "temporary" lookup execute
"poo" "words.tests" lookup execute
] unit-test
[ t ] [ t vocabs [ words [ word? and ] each ] each ] unit-test
@ -50,7 +50,7 @@ SYMBOL: a-symbol
! See if redefining a generic as a colon def clears some
! word props.
GENERIC: testing
"IN: temporary : testing ;" eval
"IN: words.tests : testing ;" eval
[ f ] [ \ testing generic? ] unit-test
@ -112,13 +112,13 @@ M: array freakish ;
DEFER: x
[ x ] [ undefined? ] must-fail-with
[ ] [ "no-loc" "temporary" create drop ] unit-test
[ f ] [ "no-loc" "temporary" lookup where ] unit-test
[ ] [ "no-loc" "words.tests" create drop ] unit-test
[ f ] [ "no-loc" "words.tests" lookup where ] unit-test
[ ] [ "IN: temporary : no-loc-2 ;" eval ] unit-test
[ f ] [ "no-loc-2" "temporary" lookup where ] unit-test
[ ] [ "IN: words.tests : no-loc-2 ;" eval ] unit-test
[ f ] [ "no-loc-2" "words.tests" lookup where ] unit-test
[ ] [ "IN: temporary : test-last ( -- ) ;" eval ] unit-test
[ ] [ "IN: words.tests : test-last ( -- ) ;" eval ] unit-test
[ "test-last" ] [ word word-name ] unit-test
! regression
@ -141,40 +141,40 @@ SYMBOL: quot-uses-b
[ { + } ] [ \ quot-uses-b uses ] unit-test
[ "IN: temporary : undef-test ; << undef-test >>" eval ]
[ "IN: words.tests : undef-test ; << undef-test >>" eval ]
[ [ undefined? ] is? ] must-fail-with
[ ] [
"IN: temporary GENERIC: symbol-generic" eval
"IN: words.tests GENERIC: symbol-generic" eval
] unit-test
[ ] [
"IN: temporary SYMBOL: symbol-generic" eval
"IN: words.tests SYMBOL: symbol-generic" eval
] unit-test
[ t ] [ "symbol-generic" "temporary" lookup symbol? ] unit-test
[ f ] [ "symbol-generic" "temporary" lookup generic? ] unit-test
[ t ] [ "symbol-generic" "words.tests" lookup symbol? ] unit-test
[ f ] [ "symbol-generic" "words.tests" lookup generic? ] unit-test
[ ] [
"IN: temporary GENERIC: symbol-generic" <string-reader>
"IN: words.tests GENERIC: symbol-generic" <string-reader>
"symbol-generic-test" parse-stream drop
] unit-test
[ ] [
"IN: temporary TUPLE: symbol-generic ;" <string-reader>
"IN: words.tests TUPLE: symbol-generic ;" <string-reader>
"symbol-generic-test" parse-stream drop
] unit-test
[ t ] [ "symbol-generic" "temporary" lookup symbol? ] unit-test
[ f ] [ "symbol-generic" "temporary" lookup generic? ] unit-test
[ t ] [ "symbol-generic" "words.tests" lookup symbol? ] unit-test
[ f ] [ "symbol-generic" "words.tests" lookup generic? ] unit-test
! Regressions
[ ] [ "IN: temporary : decl-forget-test ; foldable" eval ] unit-test
[ t ] [ "decl-forget-test" "temporary" lookup "foldable" word-prop ] unit-test
[ ] [ "IN: temporary : decl-forget-test ;" eval ] unit-test
[ f ] [ "decl-forget-test" "temporary" lookup "foldable" word-prop ] unit-test
[ ] [ "IN: words.tests : decl-forget-test ; foldable" eval ] unit-test
[ t ] [ "decl-forget-test" "words.tests" lookup "foldable" word-prop ] unit-test
[ ] [ "IN: words.tests : decl-forget-test ;" eval ] unit-test
[ f ] [ "decl-forget-test" "words.tests" lookup "foldable" word-prop ] unit-test
[ ] [ "IN: temporary : decl-forget-test ; flushable" eval ] unit-test
[ t ] [ "decl-forget-test" "temporary" lookup "flushable" word-prop ] unit-test
[ ] [ "IN: temporary : decl-forget-test ;" eval ] unit-test
[ f ] [ "decl-forget-test" "temporary" lookup "flushable" word-prop ] unit-test
[ ] [ "IN: words.tests : decl-forget-test ; flushable" eval ] unit-test
[ t ] [ "decl-forget-test" "words.tests" lookup "flushable" word-prop ] unit-test
[ ] [ "IN: words.tests : decl-forget-test ;" eval ] unit-test
[ f ] [ "decl-forget-test" "words.tests" lookup "flushable" word-prop ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: ascii.tests
USING: ascii tools.test sequences kernel math ;
[ t ] [ CHAR: a letter? ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: benchmark.reverse-complement.tests
USING: tools.test benchmark.reverse-complement crypto.md5
io.files kernel ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: calendar.format.tests
USING: calendar.format tools.test io.streams.string ;
[ 0 ] [

View File

@ -3,7 +3,7 @@
!
USING: kernel tools.test math channels channels.private
sequences threads sorting ;
IN: temporary
IN: channels.tests
{ V{ 10 } } [
V{ } clone <channel>

View File

@ -3,7 +3,7 @@
!
USING: kernel tools.test math assocs channels channels.remote
channels.remote.private ;
IN: temporary
IN: channels.remote.tests
{ t } [
remote-channels assoc?

View File

@ -1,4 +1,4 @@
IN: temporary
IN: cocoa.tests
USING: cocoa cocoa.messages cocoa.subclassing cocoa.types
compiler kernel namespaces cocoa.classes tools.test memory
compiler.units ;

View File

@ -1,6 +1,6 @@
USING: combinators.lib kernel math random sequences tools.test continuations
arrays vectors ;
IN: temporary
IN: combinators.lib.tests
[ 5 ] [ [ 10 random ] [ 5 = ] generate ] unit-test
[ t ] [ [ 10 random ] [ even? ] generate even? ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.combinators.tests
USING: concurrency.combinators tools.test random kernel math
concurrency.mailboxes threads sequences ;

View File

@ -1,5 +1,5 @@
USING: concurrency.count-downs threads kernel tools.test ;
IN: temporary`
IN: concurrency.count-downs.tests`
[ ] [ 0 <count-down> await ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.exchangers.tests
USING: sequences tools.test concurrency.exchangers
concurrency.count-downs concurrency.promises locals kernel
threads ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.flags.tests
USING: tools.test concurrency.flags kernel threads locals ;
:: flag-test-1 ( -- )

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.futures.tests
USING: concurrency.futures kernel tools.test threads ;
[ 50 ] [

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.locks.tests
USING: tools.test concurrency.locks concurrency.count-downs
concurrency.messaging concurrency.mailboxes locals kernel
threads sequences calendar ;

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.mailboxes.tests
USING: concurrency.mailboxes vectors sequences threads
tools.test math kernel strings ;

View File

@ -4,7 +4,7 @@
USING: kernel threads vectors arrays sequences
namespaces tools.test continuations dlists strings math words
match quotations concurrency.messaging concurrency.mailboxes ;
IN: temporary
IN: concurrency.messaging.tests
[ ] [ my-mailbox mailbox-data dlist-delete-all ] unit-test

View File

@ -1,4 +1,4 @@
IN: temporary
IN: concurrency.promises.tests
USING: vectors concurrency.promises kernel threads sequences
tools.test ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2005 Chris Double, 2007 Clemens Hofreither.
! See http://factorcode.org/license.txt for BSD license.
IN: temporary
IN: coroutines.tests
USING: coroutines kernel sequences prettyprint tools.test math ;
: test1 ( -- co )

View File

@ -1,5 +1,5 @@
USING: kernel io strings sequences namespaces math parser crypto.hmac tools.test ;
IN: temporary
IN: crypto.hmac.tests
[ "\u000092\u000094rz68\u0000bb\u00001c\u000013\u0000f4\u00008e\u0000f8\u000015\u00008b\u0000fc\u00009d" ] [ 16 11 <string> "Hi There" string>md5-hmac >string ] unit-test
[ "u\u00000cx>j\u0000b0\u0000b5\u000003\u0000ea\u0000a8n1\n]\u0000b78" ] [ "Jefe" "what do ya want for nothing?" string>md5-hmac >string ] unit-test

View File

@ -1,4 +1,4 @@
USING: crypto.timing kernel tools.test system math ;
IN: temporary
IN: crypto.timing.tests
[ t ] [ millis [ ] 1000 with-timing millis swap - 1000 >= ] unit-test

Some files were not shown because too many files have changed in this diff Show More