Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring
parent
cd1bb8f4c8
commit
3f3d57032b
|
@ -1,6 +1,6 @@
|
||||||
IN: alarms.tests
|
|
||||||
USING: alarms alarms.private kernel calendar sequences
|
USING: alarms alarms.private kernel calendar sequences
|
||||||
tools.test threads concurrency.count-downs ;
|
tools.test threads concurrency.count-downs ;
|
||||||
|
IN: alarms.tests
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
1 <count-down>
|
1 <count-down>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2005, 2008 Slava Pestov, Doug Coleman.
|
! Copyright (C) 2005, 2008 Slava Pestov, Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays calendar combinators generic init
|
USING: accessors assocs boxes calendar
|
||||||
kernel math namespaces sequences heaps boxes threads
|
combinators.short-circuit fry heaps init kernel math.order
|
||||||
quotations assocs math.order ;
|
namespaces quotations threads ;
|
||||||
IN: alarms
|
IN: alarms
|
||||||
|
|
||||||
TUPLE: alarm
|
TUPLE: alarm
|
||||||
|
@ -21,21 +21,21 @@ SYMBOL: alarm-thread
|
||||||
|
|
||||||
ERROR: bad-alarm-frequency frequency ;
|
ERROR: bad-alarm-frequency frequency ;
|
||||||
: check-alarm ( frequency/f -- frequency/f )
|
: check-alarm ( frequency/f -- frequency/f )
|
||||||
dup [ duration? ] [ not ] bi or [ bad-alarm-frequency ] unless ;
|
dup { [ duration? ] [ not ] } 1|| [ bad-alarm-frequency ] unless ;
|
||||||
|
|
||||||
: <alarm> ( quot time frequency -- alarm )
|
: <alarm> ( quot time frequency -- alarm )
|
||||||
check-alarm <box> alarm boa ;
|
check-alarm <box> alarm boa ;
|
||||||
|
|
||||||
: register-alarm ( alarm -- )
|
: register-alarm ( alarm -- )
|
||||||
dup dup time>> alarms get-global heap-push*
|
[ dup time>> alarms get-global heap-push* ]
|
||||||
swap entry>> >box
|
[ entry>> >box ] bi
|
||||||
notify-alarm-thread ;
|
notify-alarm-thread ;
|
||||||
|
|
||||||
: alarm-expired? ( alarm now -- ? )
|
: alarm-expired? ( alarm now -- ? )
|
||||||
[ time>> ] dip before=? ;
|
[ time>> ] dip before=? ;
|
||||||
|
|
||||||
: reschedule-alarm ( alarm -- )
|
: reschedule-alarm ( alarm -- )
|
||||||
dup [ swap interval>> time+ now max ] change-time register-alarm ;
|
dup '[ _ interval>> time+ now max ] change-time register-alarm ;
|
||||||
|
|
||||||
: call-alarm ( alarm -- )
|
: call-alarm ( alarm -- )
|
||||||
[ entry>> box> drop ]
|
[ entry>> box> drop ]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: alien.c-types.tests
|
|
||||||
USING: alien alien.syntax alien.c-types kernel tools.test
|
USING: alien alien.syntax alien.c-types kernel tools.test
|
||||||
sequences system libc alien.strings io.encodings.utf8 ;
|
sequences system libc alien.strings io.encodings.utf8 ;
|
||||||
|
IN: alien.c-types.tests
|
||||||
|
|
||||||
CONSTANT: xyz 123
|
CONSTANT: xyz 123
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test alien.complex.functor ;
|
|
||||||
IN: alien.complex.functor.tests
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test alien.destructors ;
|
|
||||||
IN: alien.destructors.tests
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: alien.libraries.tests
|
|
||||||
USING: alien.libraries alien.syntax tools.test kernel ;
|
USING: alien.libraries alien.syntax tools.test kernel ;
|
||||||
|
IN: alien.libraries.tests
|
||||||
|
|
||||||
[ f ] [ DLL" fadfasdfsada" dll-valid? ] unit-test
|
[ f ] [ DLL" fadfasdfsada" dll-valid? ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: alien.structs.tests
|
|
||||||
USING: alien alien.syntax alien.c-types kernel tools.test
|
USING: alien alien.syntax alien.c-types kernel tools.test
|
||||||
sequences system libc words vocabs namespaces layouts ;
|
sequences system libc words vocabs namespaces layouts ;
|
||||||
|
IN: alien.structs.tests
|
||||||
|
|
||||||
C-STRUCT: bar
|
C-STRUCT: bar
|
||||||
{ "int" "x" }
|
{ "int" "x" }
|
||||||
|
|
|
@ -31,8 +31,10 @@ SYNTAX: C-ENUM:
|
||||||
";" parse-tokens
|
";" parse-tokens
|
||||||
[ [ create-in ] dip define-constant ] each-index ;
|
[ [ create-in ] dip define-constant ] each-index ;
|
||||||
|
|
||||||
|
ERROR: no-such-symbol name library ;
|
||||||
|
|
||||||
: address-of ( name library -- value )
|
: address-of ( name library -- value )
|
||||||
load-library dlsym [ "No such symbol" throw ] unless* ;
|
2dup load-library dlsym [ 2nip ] [ no-such-symbol ] if* ;
|
||||||
|
|
||||||
SYNTAX: &:
|
SYNTAX: &:
|
||||||
scan "c-library" get '[ _ _ address-of ] over push-all ;
|
scan "c-library" get '[ _ _ address-of ] over push-all ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: biassocs.tests
|
|
||||||
USING: biassocs assocs namespaces tools.test ;
|
USING: biassocs assocs namespaces tools.test ;
|
||||||
|
IN: biassocs.tests
|
||||||
|
|
||||||
<bihash> "h" set
|
<bihash> "h" set
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: binary-search.tests
|
|
||||||
USING: binary-search math.order vectors kernel tools.test ;
|
USING: binary-search math.order vectors kernel tools.test ;
|
||||||
|
IN: binary-search.tests
|
||||||
|
|
||||||
[ f ] [ 3 { } [ <=> ] with search drop ] unit-test
|
[ f ] [ 3 { } [ <=> ] with search drop ] unit-test
|
||||||
[ 0 ] [ 3 { 3 } [ <=> ] with search drop ] unit-test
|
[ 0 ] [ 3 { 3 } [ <=> ] with search drop ] unit-test
|
||||||
|
@ -9,7 +9,7 @@ USING: binary-search math.order vectors kernel tools.test ;
|
||||||
[ 4 ] [ 5.5 { 1 2 3 4 5 6 7 8 } [ <=> ] with search drop ] unit-test
|
[ 4 ] [ 5.5 { 1 2 3 4 5 6 7 8 } [ <=> ] with search drop ] unit-test
|
||||||
[ 10 ] [ 10 20 >vector [ <=> ] with search drop ] unit-test
|
[ 10 ] [ 10 20 >vector [ <=> ] with search drop ] unit-test
|
||||||
|
|
||||||
[ t ] [ "hello" { "alligrator" "cat" "fish" "hello" "ikarus" "java" } sorted-member? ] unit-test
|
[ t ] [ "hello" { "alligator" "cat" "fish" "hello" "ikarus" "java" } sorted-member? ] unit-test
|
||||||
[ 3 ] [ "hey" { "alligrator" "cat" "fish" "hello" "ikarus" "java" } sorted-index ] unit-test
|
[ 3 ] [ "hey" { "alligator" "cat" "fish" "hello" "ikarus" "java" } sorted-index ] unit-test
|
||||||
[ f ] [ "hello" { "alligrator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
|
[ f ] [ "hello" { "alligator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
|
||||||
[ f ] [ "zebra" { "alligrator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
|
[ f ] [ "zebra" { "alligator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: bit-sets.tests
|
|
||||||
USING: bit-sets tools.test bit-arrays ;
|
USING: bit-sets tools.test bit-arrays ;
|
||||||
|
IN: bit-sets.tests
|
||||||
|
|
||||||
[ ?{ t f t f t f } ] [
|
[ ?{ t f t f t f } ] [
|
||||||
?{ t f f f t f }
|
?{ t f f f t f }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: bit-vectors.tests
|
|
||||||
USING: tools.test bit-vectors vectors sequences kernel math ;
|
USING: tools.test bit-vectors vectors sequences kernel math ;
|
||||||
|
IN: bit-vectors.tests
|
||||||
|
|
||||||
[ 0 ] [ 123 <bit-vector> length ] unit-test
|
[ 0 ] [ 123 <bit-vector> length ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ grouping compression.lzw multiline byte-arrays io.encodings.binary
|
||||||
io.streams.byte-array ;
|
io.streams.byte-array ;
|
||||||
IN: bitstreams.tests
|
IN: bitstreams.tests
|
||||||
|
|
||||||
|
|
||||||
[ BIN: 1111111111 ]
|
[ BIN: 1111111111 ]
|
||||||
[
|
[
|
||||||
B{ HEX: 0f HEX: ff HEX: ff HEX: ff } <msb0-bit-reader>
|
B{ HEX: 0f HEX: ff HEX: ff HEX: ff } <msb0-bit-reader>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: bootstrap.image.tests
|
|
||||||
USING: bootstrap.image bootstrap.image.private tools.test
|
USING: bootstrap.image bootstrap.image.private tools.test
|
||||||
kernel math ;
|
kernel math ;
|
||||||
|
IN: bootstrap.image.tests
|
||||||
|
|
||||||
[ f ] [ { 1 2 3 } [ 1 2 3 ] eql? ] unit-test
|
[ f ] [ { 1 2 3 } [ 1 2 3 ] eql? ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: boxes.tests
|
|
||||||
USING: boxes namespaces tools.test accessors ;
|
USING: boxes namespaces tools.test accessors ;
|
||||||
|
IN: boxes.tests
|
||||||
|
|
||||||
[ ] [ <box> "b" set ] unit-test
|
[ ] [ <box> "b" set ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,3 @@ SYNTAX: HEX{
|
||||||
[ blank? not ] filter
|
[ blank? not ] filter
|
||||||
2 group [ hex> ] B{ } map-as
|
2 group [ hex> ] B{ } map-as
|
||||||
parsed ;
|
parsed ;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test cache ;
|
|
||||||
IN: cache.tests
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: cairo.tests
|
|
||||||
USING: cairo tools.test math.rectangles accessors ;
|
USING: cairo tools.test math.rectangles accessors ;
|
||||||
|
IN: cairo.tests
|
||||||
|
|
||||||
[ { 10 20 } ] [
|
[ { 10 20 } ] [
|
||||||
{ 10 20 } [
|
{ 10 20 } [
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
! Copyright (C) 2009 Alaric Snell-Pym
|
! Copyright (C) 2009 Alaric Snell-Pym
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
|
||||||
USING: checksums classes.singleton kernel math math.ranges
|
USING: checksums classes.singleton kernel math math.ranges
|
||||||
math.vectors sequences ;
|
math.vectors sequences ;
|
||||||
|
|
||||||
IN: checksums.fnv1
|
IN: checksums.fnv1
|
||||||
|
|
||||||
SINGLETON: fnv1-32
|
SINGLETON: fnv1-32
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
! Copyright (C) 2009 Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: byte-arrays checksums checksums.md5 io.encodings.binary
|
USING: byte-arrays checksums checksums.md5 io.encodings.binary
|
||||||
io.streams.byte-array kernel math namespaces tools.test ;
|
io.streams.byte-array kernel math namespaces tools.test ;
|
||||||
|
IN: checksums.md5.tests
|
||||||
|
|
||||||
[ "d41d8cd98f00b204e9800998ecf8427e" ] [ "" >byte-array md5 checksum-bytes hex-string ] unit-test
|
[ "d41d8cd98f00b204e9800998ecf8427e" ] [ "" >byte-array md5 checksum-bytes hex-string ] unit-test
|
||||||
[ "0cc175b9c0f1b6a831c399e269772661" ] [ "a" >byte-array md5 checksum-bytes hex-string ] unit-test
|
[ "0cc175b9c0f1b6a831c399e269772661" ] [ "a" >byte-array md5 checksum-bytes hex-string ] unit-test
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
! See http;//factorcode.org/license.txt for BSD license
|
! See http;//factorcode.org/license.txt for BSD license
|
||||||
USING: arrays kernel tools.test sequences sequences.private
|
USING: arrays kernel tools.test sequences sequences.private
|
||||||
circular strings ;
|
circular strings ;
|
||||||
|
IN: circular.tests
|
||||||
|
|
||||||
[ 0 ] [ { 0 1 2 3 4 } <circular> 0 swap virtual@ drop ] unit-test
|
[ 0 ] [ { 0 1 2 3 4 } <circular> 0 swap virtual@ drop ] unit-test
|
||||||
[ 2 ] [ { 0 1 2 3 4 } <circular> 2 swap virtual@ drop ] unit-test
|
[ 2 ] [ { 0 1 2 3 4 } <circular> 2 swap virtual@ drop ] unit-test
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2005, 2006 Kevin Reid.
|
! Copyright (C) 2005, 2006 Kevin Reid.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
IN: cocoa.callbacks
|
|
||||||
USING: assocs kernel namespaces cocoa cocoa.classes
|
USING: assocs kernel namespaces cocoa cocoa.classes
|
||||||
cocoa.subclassing debugger ;
|
cocoa.subclassing debugger ;
|
||||||
|
IN: cocoa.callbacks
|
||||||
|
|
||||||
SYMBOL: callbacks
|
SYMBOL: callbacks
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: cocoa.tests
|
|
||||||
USING: cocoa cocoa.messages cocoa.subclassing cocoa.types
|
USING: cocoa cocoa.messages cocoa.subclassing cocoa.types
|
||||||
compiler kernel namespaces cocoa.classes tools.test memory
|
compiler kernel namespaces cocoa.classes tools.test memory
|
||||||
compiler.units math core-graphics.types ;
|
compiler.units math core-graphics.types ;
|
||||||
|
IN: cocoa.tests
|
||||||
|
|
||||||
CLASS: {
|
CLASS: {
|
||||||
{ +superclass+ "NSObject" }
|
{ +superclass+ "NSObject" }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: cocoa.plists.tests
|
|
||||||
USING: tools.test cocoa.plists colors kernel hashtables
|
USING: tools.test cocoa.plists colors kernel hashtables
|
||||||
core-foundation.utilities core-foundation destructors
|
core-foundation.utilities core-foundation destructors
|
||||||
assocs cocoa.enumeration ;
|
assocs cocoa.enumeration ;
|
||||||
|
IN: cocoa.plists.tests
|
||||||
|
|
||||||
[
|
[
|
||||||
[ V{ } ] [ H{ } >cf &CFRelease [ ] NSFastEnumeration-map ] unit-test
|
[ V{ } ] [ H{ } >cf &CFRelease [ ] NSFastEnumeration-map ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: colors.hsv.tests
|
|
||||||
USING: accessors kernel colors colors.hsv tools.test math ;
|
USING: accessors kernel colors colors.hsv tools.test math ;
|
||||||
|
IN: colors.hsv.tests
|
||||||
|
|
||||||
: hsv>rgb ( h s v -- r g b )
|
: hsv>rgb ( h s v -- r g b )
|
||||||
[ 360 * ] 2dip
|
[ 360 * ] 2dip
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: columns.tests
|
|
||||||
USING: columns sequences kernel namespaces arrays tools.test math ;
|
USING: columns sequences kernel namespaces arrays tools.test math ;
|
||||||
|
IN: columns.tests
|
||||||
|
|
||||||
! Columns
|
! Columns
|
||||||
{ { 1 2 3 } { 4 5 6 } { 7 8 9 } } [ clone ] map "seq" set
|
{ { 1 2 3 } { 4 5 6 } { 7 8 9 } } [ clone ] map "seq" set
|
||||||
|
|
|
@ -1,32 +1,18 @@
|
||||||
|
|
||||||
USING: kernel math tools.test combinators.short-circuit.smart ;
|
USING: kernel math tools.test combinators.short-circuit.smart ;
|
||||||
|
|
||||||
IN: combinators.short-circuit.smart.tests
|
IN: combinators.short-circuit.smart.tests
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
[ t ] [ { [ 1 ] [ 2 ] [ 3 ] } && 3 = ] unit-test
|
||||||
|
[ t ] [ 3 { [ 0 > ] [ odd? ] [ 2 + ] } && 5 = ] unit-test
|
||||||
|
[ t ] [ 10 20 { [ + 0 > ] [ - even? ] [ + ] } && 30 = ] unit-test
|
||||||
|
|
||||||
: must-be-t ( in -- ) [ t ] swap unit-test ;
|
[ f ] [ { [ 1 ] [ f ] [ 3 ] } && 3 = ] unit-test
|
||||||
: must-be-f ( in -- ) [ f ] swap unit-test ;
|
[ f ] [ 3 { [ 0 > ] [ even? ] [ 2 + ] } && ] unit-test
|
||||||
|
[ f ] [ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } && 30 = ] unit-test
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
[ t ] [ { [ 10 0 < ] [ f ] [ "factor" ] } || "factor" = ] unit-test
|
||||||
|
|
||||||
[ { [ 1 ] [ 2 ] [ 3 ] } && 3 = ] must-be-t
|
[ t ] [ 10 { [ odd? ] [ 100 > ] [ 1 + ] } || 11 = ] unit-test
|
||||||
[ 3 { [ 0 > ] [ odd? ] [ 2 + ] } && 5 = ] must-be-t
|
|
||||||
[ 10 20 { [ + 0 > ] [ - even? ] [ + ] } && 30 = ] must-be-t
|
|
||||||
|
|
||||||
[ { [ 1 ] [ f ] [ 3 ] } && 3 = ] must-be-f
|
[ t ] [ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } || 30 = ] unit-test
|
||||||
[ 3 { [ 0 > ] [ even? ] [ 2 + ] } && ] must-be-f
|
|
||||||
[ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } && 30 = ] must-be-f
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
[ { [ 10 0 < ] [ f ] [ "factor" ] } || "factor" = ] must-be-t
|
|
||||||
|
|
||||||
[ 10 { [ odd? ] [ 100 > ] [ 1 + ] } || 11 = ] must-be-t
|
|
||||||
|
|
||||||
[ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } || 30 = ] must-be-t
|
|
||||||
|
|
||||||
[ { [ 10 0 < ] [ f ] [ 0 1 = ] } || ] must-be-f
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
|
[ f ] [ { [ 10 0 < ] [ f ] [ 0 1 = ] } || ] unit-test
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
USING: kernel sequences math stack-checker effects accessors macros
|
USING: kernel sequences math stack-checker effects accessors
|
||||||
fry combinators.short-circuit ;
|
macros fry combinators.short-circuit ;
|
||||||
IN: combinators.short-circuit.smart
|
IN: combinators.short-circuit.smart
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
|
ERROR: cannot-determine-arity ;
|
||||||
|
|
||||||
: arity ( quots -- n )
|
: arity ( quots -- n )
|
||||||
first infer
|
first infer
|
||||||
dup terminated?>> [ "Cannot determine arity" throw ] when
|
dup terminated?>> [ cannot-determine-arity ] when
|
||||||
effect-height neg 1 + ;
|
effect-height neg 1 + ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
IN: compiler.cfg.alias-analysis.tests
|
|
|
@ -1,4 +1,3 @@
|
||||||
IN: compiler.cfg.builder.tests
|
|
||||||
USING: tools.test kernel sequences words sequences.private fry
|
USING: tools.test kernel sequences words sequences.private fry
|
||||||
prettyprint alien alien.accessors math.private compiler.tree.builder
|
prettyprint alien alien.accessors math.private compiler.tree.builder
|
||||||
compiler.tree.optimizer compiler.cfg.builder compiler.cfg.debugger
|
compiler.tree.optimizer compiler.cfg.builder compiler.cfg.debugger
|
||||||
|
@ -6,6 +5,7 @@ compiler.cfg.optimizer compiler.cfg.predecessors compiler.cfg.checker
|
||||||
compiler.cfg arrays locals byte-arrays kernel.private math
|
compiler.cfg arrays locals byte-arrays kernel.private math
|
||||||
slots.private vectors sbufs strings math.partial-dispatch
|
slots.private vectors sbufs strings math.partial-dispatch
|
||||||
strings.private ;
|
strings.private ;
|
||||||
|
IN: compiler.cfg.builder.tests
|
||||||
|
|
||||||
! Just ensure that various CFGs build correctly.
|
! Just ensure that various CFGs build correctly.
|
||||||
: unit-test-cfg ( quot -- )
|
: unit-test-cfg ( quot -- )
|
||||||
|
|
|
@ -8,6 +8,7 @@ compiler.cfg
|
||||||
compiler.cfg.debugger
|
compiler.cfg.debugger
|
||||||
compiler.cfg.instructions
|
compiler.cfg.instructions
|
||||||
compiler.cfg.registers ;
|
compiler.cfg.registers ;
|
||||||
|
IN: compiler.cfg.def-use.tests
|
||||||
|
|
||||||
V{
|
V{
|
||||||
T{ ##peek f 0 D 0 }
|
T{ ##peek f 0 D 0 }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: compiler.cfg.dominance.tests
|
|
||||||
USING: tools.test sequences vectors namespaces kernel accessors assocs sets
|
USING: tools.test sequences vectors namespaces kernel accessors assocs sets
|
||||||
math.ranges arrays compiler.cfg compiler.cfg.dominance compiler.cfg.debugger
|
math.ranges arrays compiler.cfg compiler.cfg.dominance compiler.cfg.debugger
|
||||||
compiler.cfg.predecessors ;
|
compiler.cfg.predecessors ;
|
||||||
|
IN: compiler.cfg.dominance.tests
|
||||||
|
|
||||||
: test-dominance ( -- )
|
: test-dominance ( -- )
|
||||||
cfg new 0 get >>entry
|
cfg new 0 get >>entry
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
IN: compiler.cfg.gc-checks.tests
|
|
||||||
USING: compiler.cfg.gc-checks compiler.cfg.debugger
|
USING: compiler.cfg.gc-checks compiler.cfg.debugger
|
||||||
compiler.cfg.registers compiler.cfg.instructions compiler.cfg
|
compiler.cfg.registers compiler.cfg.instructions compiler.cfg
|
||||||
compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
|
compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
|
||||||
namespaces accessors sequences ;
|
namespaces accessors sequences ;
|
||||||
|
IN: compiler.cfg.gc-checks.tests
|
||||||
|
|
||||||
: test-gc-checks ( -- )
|
: test-gc-checks ( -- )
|
||||||
H{ } clone representations set
|
H{ } clone representations set
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
IN: compiler.cfg.linear-scan.resolve.tests
|
|
||||||
USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
|
USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
|
||||||
accessors
|
accessors
|
||||||
compiler.cfg
|
compiler.cfg
|
||||||
compiler.cfg.instructions cpu.architecture make sequences
|
compiler.cfg.instructions cpu.architecture make sequences
|
||||||
compiler.cfg.linear-scan.allocation.state ;
|
compiler.cfg.linear-scan.allocation.state ;
|
||||||
|
IN: compiler.cfg.linear-scan.resolve.tests
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
IN: compiler.cfg.linearization.tests
|
|
||||||
USING: compiler.cfg.linearization tools.test ;
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
IN: compiler.cfg.loop-detection.tests
|
|
||||||
USING: compiler.cfg compiler.cfg.loop-detection
|
USING: compiler.cfg compiler.cfg.loop-detection
|
||||||
compiler.cfg.predecessors
|
compiler.cfg.predecessors
|
||||||
compiler.cfg.debugger
|
compiler.cfg.debugger
|
||||||
tools.test kernel namespaces accessors ;
|
tools.test kernel namespaces accessors ;
|
||||||
|
IN: compiler.cfg.loop-detection.tests
|
||||||
|
|
||||||
V{ } 0 test-bb
|
V{ } 0 test-bb
|
||||||
V{ } 1 test-bb
|
V{ } 1 test-bb
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
IN: compiler.cfg.stacks.uninitialized.tests
|
|
||||||
USING: compiler.cfg.stacks.uninitialized compiler.cfg.debugger
|
USING: compiler.cfg.stacks.uninitialized compiler.cfg.debugger
|
||||||
compiler.cfg.registers compiler.cfg.instructions compiler.cfg
|
compiler.cfg.registers compiler.cfg.instructions compiler.cfg
|
||||||
compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
|
compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
|
||||||
namespaces accessors sequences ;
|
namespaces accessors sequences ;
|
||||||
|
IN: compiler.cfg.stacks.uninitialized.tests
|
||||||
|
|
||||||
: test-uninitialized ( -- )
|
: test-uninitialized ( -- )
|
||||||
cfg new 0 get >>entry
|
cfg new 0 get >>entry
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.cfg.two-operand.tests
|
|
||||||
USING: kernel compiler.cfg.two-operand compiler.cfg.instructions
|
USING: kernel compiler.cfg.two-operand compiler.cfg.instructions
|
||||||
compiler.cfg.registers cpu.architecture namespaces tools.test ;
|
compiler.cfg.registers cpu.architecture namespaces tools.test ;
|
||||||
|
IN: compiler.cfg.two-operand.tests
|
||||||
|
|
||||||
3 vreg-counter set-global
|
3 vreg-counter set-global
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.codegen.tests
|
|
||||||
USING: compiler.codegen.fixup tools.test cpu.architecture math kernel make
|
USING: compiler.codegen.fixup tools.test cpu.architecture math kernel make
|
||||||
compiler.constants ;
|
compiler.constants ;
|
||||||
|
IN: compiler.codegen.tests
|
||||||
|
|
||||||
[ ] [ [ ] with-fixup drop ] unit-test
|
[ ] [ [ ] with-fixup drop ] unit-test
|
||||||
[ ] [ [ \ + %call ] with-fixup drop ] unit-test
|
[ ] [ [ \ + %call ] with-fixup drop ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.call-effect
|
|
||||||
USING: tools.test combinators generic.single sequences kernel ;
|
USING: tools.test combinators generic.single sequences kernel ;
|
||||||
|
IN: compiler.tests.call-effect
|
||||||
|
|
||||||
: execute-ic-test ( a b -- c ) execute( a -- c ) ;
|
: execute-ic-test ( a b -- c ) execute( a -- c ) ;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tests.float
|
|
||||||
USING: compiler.units compiler kernel kernel.private memory math
|
USING: compiler.units compiler kernel kernel.private memory math
|
||||||
math.private tools.test math.floats.private ;
|
math.private tools.test math.floats.private ;
|
||||||
|
IN: compiler.tests.float
|
||||||
|
|
||||||
[ 5.0 ] [ [ 5.0 ] compile-call gc gc gc ] unit-test
|
[ 5.0 ] [ [ 5.0 ] compile-call gc gc gc ] unit-test
|
||||||
[ 2.0 3.0 ] [ 3.0 [ 2.0 swap ] compile-call ] unit-test
|
[ 2.0 3.0 ] [ 3.0 [ 2.0 swap ] compile-call ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.generic
|
|
||||||
USING: tools.test math kernel compiler.units definitions ;
|
USING: tools.test math kernel compiler.units definitions ;
|
||||||
|
IN: compiler.tests.generic
|
||||||
|
|
||||||
GENERIC: bad ( -- )
|
GENERIC: bad ( -- )
|
||||||
M: integer bad ;
|
M: integer bad ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.peg-regression-2
|
|
||||||
USING: peg.ebnf strings tools.test ;
|
USING: peg.ebnf strings tools.test ;
|
||||||
|
IN: compiler.tests.peg-regression-2
|
||||||
|
|
||||||
GENERIC: <times> ( times -- term' )
|
GENERIC: <times> ( times -- term' )
|
||||||
M: string <times> ;
|
M: string <times> ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.pic-problem-1
|
|
||||||
USING: kernel sequences prettyprint memory tools.test ;
|
USING: kernel sequences prettyprint memory tools.test ;
|
||||||
|
IN: compiler.tests.pic-problem-1
|
||||||
|
|
||||||
TUPLE: x ;
|
TUPLE: x ;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tests.redefine0
|
|
||||||
USING: tools.test eval compiler compiler.errors compiler.units definitions kernel math
|
USING: tools.test eval compiler compiler.errors compiler.units definitions kernel math
|
||||||
namespaces macros assocs ;
|
namespaces macros assocs ;
|
||||||
|
IN: compiler.tests.redefine0
|
||||||
|
|
||||||
! Test ripple-up behavior
|
! Test ripple-up behavior
|
||||||
: test-1 ( -- a ) 3 ;
|
: test-1 ( -- a ) 3 ;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tests.redefine16
|
|
||||||
USING: eval tools.test definitions words compiler.units
|
USING: eval tools.test definitions words compiler.units
|
||||||
quotations stack-checker ;
|
quotations stack-checker ;
|
||||||
|
IN: compiler.tests.redefine16
|
||||||
|
|
||||||
[ ] [ [ "blah" "compiler.tests.redefine16" lookup forget ] with-compilation-unit ] unit-test
|
[ ] [ [ "blah" "compiler.tests.redefine16" lookup forget ] with-compilation-unit ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tests.redefine17
|
|
||||||
USING: tools.test classes.mixin compiler.units arrays kernel.private
|
USING: tools.test classes.mixin compiler.units arrays kernel.private
|
||||||
strings sequences vocabs definitions kernel ;
|
strings sequences vocabs definitions kernel ;
|
||||||
|
IN: compiler.tests.redefine17
|
||||||
|
|
||||||
<< "compiler.tests.redefine17" words forget-all >>
|
<< "compiler.tests.redefine17" words forget-all >>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: compiler.tests.redefine2
|
|
||||||
USING: compiler compiler.units tools.test math parser kernel
|
USING: compiler compiler.units tools.test math parser kernel
|
||||||
sequences sequences.private classes.mixin generic definitions
|
sequences sequences.private classes.mixin generic definitions
|
||||||
arrays words assocs eval words.symbol ;
|
arrays words assocs eval words.symbol ;
|
||||||
|
IN: compiler.tests.redefine2
|
||||||
|
|
||||||
DEFER: redefine2-test
|
DEFER: redefine2-test
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: compiler.tests.redefine3
|
|
||||||
USING: accessors compiler compiler.units tools.test math parser
|
USING: accessors compiler compiler.units tools.test math parser
|
||||||
kernel sequences sequences.private classes.mixin generic
|
kernel sequences sequences.private classes.mixin generic
|
||||||
definitions arrays words assocs eval ;
|
definitions arrays words assocs eval ;
|
||||||
|
IN: compiler.tests.redefine3
|
||||||
|
|
||||||
GENERIC: sheeple ( obj -- x )
|
GENERIC: sheeple ( obj -- x )
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.redefine4
|
|
||||||
USING: io.streams.string kernel tools.test eval ;
|
USING: io.streams.string kernel tools.test eval ;
|
||||||
|
IN: compiler.tests.redefine4
|
||||||
|
|
||||||
: declaration-test-1 ( -- a ) 3 ; flushable
|
: declaration-test-1 ( -- a ) 3 ; flushable
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.reload
|
|
||||||
USE: vocabs.loader
|
USE: vocabs.loader
|
||||||
|
IN: compiler.tests.reload
|
||||||
|
|
||||||
! "parser" reload
|
! "parser" reload
|
||||||
! "sequences" reload
|
! "sequences" reload
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: compiler.tests.stack-trace
|
|
||||||
USING: compiler tools.test namespaces sequences
|
USING: compiler tools.test namespaces sequences
|
||||||
kernel.private kernel math continuations continuations.private
|
kernel.private kernel math continuations continuations.private
|
||||||
words splitting grouping sorting accessors ;
|
words splitting grouping sorting accessors ;
|
||||||
|
IN: compiler.tests.stack-trace
|
||||||
|
|
||||||
: symbolic-stack-trace ( -- newseq )
|
: symbolic-stack-trace ( -- newseq )
|
||||||
error-continuation get call>> callstack>array
|
error-continuation get call>> callstack>array
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tests.tuples
|
|
||||||
USING: kernel tools.test compiler.units compiler ;
|
USING: kernel tools.test compiler.units compiler ;
|
||||||
|
IN: compiler.tests.tuples
|
||||||
|
|
||||||
TUPLE: color red green blue ;
|
TUPLE: color red green blue ;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tree.builder.tests
|
|
||||||
USING: compiler.tree.builder tools.test sequences kernel
|
USING: compiler.tree.builder tools.test sequences kernel
|
||||||
compiler.tree stack-checker stack-checker.errors ;
|
compiler.tree stack-checker stack-checker.errors ;
|
||||||
|
IN: compiler.tree.builder.tests
|
||||||
|
|
||||||
: inline-recursive ( -- ) inline-recursive ; inline recursive
|
: inline-recursive ( -- ) inline-recursive ; inline recursive
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
IN: compiler.tree.checker.tests
|
|
||||||
USING: compiler.tree.checker tools.test ;
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
IN: compiler.tree.cleanup.tests
|
|
||||||
USING: tools.test kernel.private kernel arrays sequences
|
USING: tools.test kernel.private kernel arrays sequences
|
||||||
math.private math generic words quotations alien alien.c-types
|
math.private math generic words quotations alien alien.c-types
|
||||||
strings sbufs sequences.private slots.private combinators
|
strings sbufs sequences.private slots.private combinators
|
||||||
|
@ -17,6 +16,7 @@ compiler.tree.propagation
|
||||||
compiler.tree.propagation.info
|
compiler.tree.propagation.info
|
||||||
compiler.tree.checker
|
compiler.tree.checker
|
||||||
compiler.tree.debugger ;
|
compiler.tree.debugger ;
|
||||||
|
IN: compiler.tree.cleanup.tests
|
||||||
|
|
||||||
[ t ] [ [ [ 1 ] [ 2 ] if ] cleaned-up-tree [ #if? ] contains-node? ] unit-test
|
[ t ] [ [ [ 1 ] [ 2 ] if ] cleaned-up-tree [ #if? ] contains-node? ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tree.combinators.tests
|
|
||||||
USING: compiler.tree.combinators tools.test kernel ;
|
USING: compiler.tree.combinators tools.test kernel ;
|
||||||
|
IN: compiler.tree.combinators.tests
|
||||||
|
|
||||||
{ 1 0 } [ [ drop ] each-node ] must-infer-as
|
{ 1 0 } [ [ drop ] each-node ] must-infer-as
|
||||||
{ 1 1 } [ [ ] map-nodes ] must-infer-as
|
{ 1 1 } [ [ ] map-nodes ] must-infer-as
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
USING: sequences namespaces kernel accessors assocs sets fry
|
USING: sequences namespaces kernel accessors assocs sets fry
|
||||||
arrays combinators columns stack-checker.backend
|
arrays combinators columns stack-checker.backend
|
||||||
stack-checker.branches compiler.tree compiler.tree.combinators
|
stack-checker.branches compiler.tree compiler.tree.combinators
|
||||||
compiler.tree.dead-code.liveness compiler.tree.dead-code.simple
|
compiler.tree.dead-code.liveness compiler.tree.dead-code.simple ;
|
||||||
;
|
|
||||||
IN: compiler.tree.dead-code.branches
|
IN: compiler.tree.dead-code.branches
|
||||||
|
|
||||||
M: #if mark-live-values* look-at-inputs ;
|
M: #if mark-live-values* look-at-inputs ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: compiler.tree.debugger.tests
|
|
||||||
USING: compiler.tree.debugger tools.test sorting sequences io math.order ;
|
USING: compiler.tree.debugger tools.test sorting sequences io math.order ;
|
||||||
|
IN: compiler.tree.debugger.tests
|
||||||
|
|
||||||
[ [ <=> ] sort ] optimized.
|
[ [ <=> ] sort ] optimized.
|
||||||
[ <reversed> [ print ] each ] optimizer-report.
|
[ <reversed> [ print ] each ] optimizer-report.
|
|
@ -1,7 +1,7 @@
|
||||||
IN: compiler.tree.escape-analysis.check.tests
|
|
||||||
USING: compiler.tree.escape-analysis.check tools.test accessors kernel
|
USING: compiler.tree.escape-analysis.check tools.test accessors kernel
|
||||||
kernel.private math compiler.tree.builder compiler.tree.normalization
|
kernel.private math compiler.tree.builder compiler.tree.normalization
|
||||||
compiler.tree.propagation compiler.tree.cleanup ;
|
compiler.tree.propagation compiler.tree.cleanup ;
|
||||||
|
IN: compiler.tree.escape-analysis.check.tests
|
||||||
|
|
||||||
: test-checker ( quot -- ? )
|
: test-checker ( quot -- ? )
|
||||||
build-tree normalize propagate cleanup run-escape-analysis? ;
|
build-tree normalize propagate cleanup run-escape-analysis? ;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
IN: compiler.tree.escape-analysis.tests
|
|
||||||
USING: compiler.tree.escape-analysis
|
USING: compiler.tree.escape-analysis
|
||||||
compiler.tree.escape-analysis.allocations compiler.tree.builder
|
compiler.tree.escape-analysis.allocations compiler.tree.builder
|
||||||
compiler.tree.recursive compiler.tree.normalization
|
compiler.tree.recursive compiler.tree.normalization
|
||||||
|
@ -10,6 +9,7 @@ classes.tuple namespaces
|
||||||
compiler.tree.propagation.info stack-checker.errors
|
compiler.tree.propagation.info stack-checker.errors
|
||||||
compiler.tree.checker
|
compiler.tree.checker
|
||||||
kernel.private vectors ;
|
kernel.private vectors ;
|
||||||
|
IN: compiler.tree.escape-analysis.tests
|
||||||
|
|
||||||
GENERIC: count-unboxed-allocations* ( m node -- n )
|
GENERIC: count-unboxed-allocations* ( m node -- n )
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: compiler.tree.escape-analysis.recursive.tests
|
|
||||||
USING: kernel tools.test namespaces sequences
|
USING: kernel tools.test namespaces sequences
|
||||||
compiler.tree.escape-analysis.recursive
|
compiler.tree.escape-analysis.recursive
|
||||||
compiler.tree.escape-analysis.allocations ;
|
compiler.tree.escape-analysis.allocations ;
|
||||||
|
IN: compiler.tree.escape-analysis.recursive.tests
|
||||||
|
|
||||||
H{ } clone allocations set
|
H{ } clone allocations set
|
||||||
<escaping-values> escaping-values set
|
<escaping-values> escaping-values set
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
! Copyright (C) 2008, 2009 Slava Pestov, Daniel Ehrenberg.
|
! Copyright (C) 2008, 2009 Slava Pestov, Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
IN: compiler.tree.modular-arithmetic.tests
|
|
||||||
USING: kernel kernel.private tools.test math math.partial-dispatch
|
USING: kernel kernel.private tools.test math math.partial-dispatch
|
||||||
math.private accessors slots.private sequences sequences.private strings sbufs
|
math.private accessors slots.private sequences sequences.private strings sbufs
|
||||||
compiler.tree.builder
|
compiler.tree.builder
|
||||||
compiler.tree.normalization
|
compiler.tree.normalization
|
||||||
compiler.tree.debugger
|
compiler.tree.debugger
|
||||||
alien.accessors layouts combinators byte-arrays ;
|
alien.accessors layouts combinators byte-arrays ;
|
||||||
|
IN: compiler.tree.modular-arithmetic.tests
|
||||||
|
|
||||||
: test-modular-arithmetic ( quot -- quot' )
|
: test-modular-arithmetic ( quot -- quot' )
|
||||||
cleaned-up-tree nodes>quot ;
|
cleaned-up-tree nodes>quot ;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
IN: compiler.tree.normalization.tests
|
|
||||||
USING: compiler.tree.builder compiler.tree.recursive
|
USING: compiler.tree.builder compiler.tree.recursive
|
||||||
compiler.tree.normalization
|
compiler.tree.normalization
|
||||||
compiler.tree.normalization.introductions
|
compiler.tree.normalization.introductions
|
||||||
compiler.tree.normalization.renaming
|
compiler.tree.normalization.renaming
|
||||||
compiler.tree compiler.tree.checker
|
compiler.tree compiler.tree.checker
|
||||||
sequences accessors tools.test kernel math ;
|
sequences accessors tools.test kernel math ;
|
||||||
|
IN: compiler.tree.normalization.tests
|
||||||
|
|
||||||
[ 3 ] [ [ 3drop 1 2 3 ] build-tree count-introductions ] unit-test
|
[ 3 ] [ [ 3drop 1 2 3 ] build-tree count-introductions ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
USING: compiler.tree.optimizer tools.test ;
|
|
||||||
IN: compiler.tree.optimizer.tests
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tree.propagation.copy.tests
|
|
||||||
USING: compiler.tree.propagation.copy tools.test namespaces kernel
|
USING: compiler.tree.propagation.copy tools.test namespaces kernel
|
||||||
assocs ;
|
assocs ;
|
||||||
|
IN: compiler.tree.propagation.copy.tests
|
||||||
|
|
||||||
H{ } clone copies set
|
H{ } clone copies set
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.tree.propagation.recursive.tests
|
|
||||||
USING: tools.test compiler.tree.propagation.recursive
|
USING: tools.test compiler.tree.propagation.recursive
|
||||||
math.intervals kernel math literals layouts ;
|
math.intervals kernel math literals layouts ;
|
||||||
|
IN: compiler.tree.propagation.recursive.tests
|
||||||
|
|
||||||
[ T{ interval f { 0 t } { 1/0. t } } ] [
|
[ T{ interval f { 0 t } { 1/0. t } } ] [
|
||||||
T{ interval f { 1 t } { 1 t } }
|
T{ interval f { 1 t } { 1 t } }
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
IN: compiler.tree.recursive.tests
|
|
||||||
USING: tools.test kernel combinators.short-circuit math sequences accessors
|
USING: tools.test kernel combinators.short-circuit math sequences accessors
|
||||||
compiler.tree
|
compiler.tree
|
||||||
compiler.tree.builder
|
compiler.tree.builder
|
||||||
compiler.tree.combinators
|
compiler.tree.combinators
|
||||||
compiler.tree.recursive
|
compiler.tree.recursive
|
||||||
compiler.tree.recursive.private ;
|
compiler.tree.recursive.private ;
|
||||||
|
IN: compiler.tree.recursive.tests
|
||||||
|
|
||||||
[ { f f f f } ] [ f { f t f f } (tail-calls) ] unit-test
|
[ { f f f f } ] [ f { f t f f } (tail-calls) ] unit-test
|
||||||
[ { f f f t } ] [ t { f t f f } (tail-calls) ] unit-test
|
[ { f f f t } ] [ t { f t f f } (tail-calls) ] unit-test
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
IN: compiler.tree.tuple-unboxing.tests
|
|
||||||
USING: tools.test compiler.tree
|
USING: tools.test compiler.tree
|
||||||
compiler.tree.builder compiler.tree.recursive
|
compiler.tree.builder compiler.tree.recursive
|
||||||
compiler.tree.normalization compiler.tree.propagation
|
compiler.tree.normalization compiler.tree.propagation
|
||||||
|
@ -7,6 +6,7 @@ compiler.tree.tuple-unboxing compiler.tree.checker
|
||||||
compiler.tree.def-use kernel accessors sequences math
|
compiler.tree.def-use kernel accessors sequences math
|
||||||
math.private sorting math.order binary-search sequences.private
|
math.private sorting math.order binary-search sequences.private
|
||||||
slots.private ;
|
slots.private ;
|
||||||
|
IN: compiler.tree.tuple-unboxing.tests
|
||||||
|
|
||||||
: test-unboxing ( quot -- )
|
: test-unboxing ( quot -- )
|
||||||
build-tree
|
build-tree
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Doug Coleman.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: accessors tools.test compression.lzw ;
|
|
||||||
IN: compression.lzw.tests
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: concurrency.combinators.tests
|
|
||||||
USING: concurrency.combinators tools.test random kernel math
|
USING: concurrency.combinators tools.test random kernel math
|
||||||
concurrency.mailboxes threads sequences accessors arrays
|
concurrency.mailboxes threads sequences accessors arrays
|
||||||
math.parser ;
|
math.parser ;
|
||||||
|
IN: concurrency.combinators.tests
|
||||||
|
|
||||||
[ [ drop ] parallel-each ] must-infer
|
[ [ drop ] parallel-each ] must-infer
|
||||||
{ 2 0 } [ [ 2drop ] 2parallel-each ] must-infer-as
|
{ 2 0 } [ [ 2drop ] 2parallel-each ] must-infer-as
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
IN: concurrency.distributed.tests
|
|
||||||
USING: tools.test concurrency.distributed kernel io.files
|
USING: tools.test concurrency.distributed kernel io.files
|
||||||
io.files.temp io.directories arrays io.sockets system
|
io.files.temp io.directories arrays io.sockets system
|
||||||
combinators threads math sequences concurrency.messaging
|
combinators threads math sequences concurrency.messaging
|
||||||
continuations accessors prettyprint ;
|
continuations accessors prettyprint ;
|
||||||
FROM: concurrency.messaging => receive send ;
|
FROM: concurrency.messaging => receive send ;
|
||||||
|
IN: concurrency.distributed.tests
|
||||||
|
|
||||||
: test-node ( -- addrspec )
|
: test-node ( -- addrspec )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
IN: concurrency.exchangers.tests
|
|
||||||
USING: tools.test concurrency.exchangers
|
USING: tools.test concurrency.exchangers
|
||||||
concurrency.count-downs concurrency.promises locals kernel
|
concurrency.count-downs concurrency.promises locals kernel
|
||||||
threads ;
|
threads ;
|
||||||
FROM: sequences => 3append ;
|
FROM: sequences => 3append ;
|
||||||
|
IN: concurrency.exchangers.tests
|
||||||
|
|
||||||
:: exchanger-test ( -- string )
|
:: exchanger-test ( -- string )
|
||||||
[let |
|
[let |
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: concurrency.flags.tests
|
|
||||||
USING: tools.test concurrency.flags concurrency.combinators
|
USING: tools.test concurrency.flags concurrency.combinators
|
||||||
kernel threads locals accessors calendar ;
|
kernel threads locals accessors calendar ;
|
||||||
|
IN: concurrency.flags.tests
|
||||||
|
|
||||||
:: flag-test-1 ( -- val )
|
:: flag-test-1 ( -- val )
|
||||||
[let | f [ <flag> ] |
|
[let | f [ <flag> ] |
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: concurrency.futures.tests
|
|
||||||
USING: concurrency.futures kernel tools.test threads ;
|
USING: concurrency.futures kernel tools.test threads ;
|
||||||
|
IN: concurrency.futures.tests
|
||||||
|
|
||||||
[ 50 ] [
|
[ 50 ] [
|
||||||
[ 50 ] future ?future
|
[ 50 ] future ?future
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: concurrency.locks.tests
|
|
||||||
USING: tools.test concurrency.locks concurrency.count-downs
|
USING: tools.test concurrency.locks concurrency.count-downs
|
||||||
concurrency.messaging concurrency.mailboxes locals kernel
|
concurrency.messaging concurrency.mailboxes locals kernel
|
||||||
threads sequences calendar accessors ;
|
threads sequences calendar accessors ;
|
||||||
|
IN: concurrency.locks.tests
|
||||||
|
|
||||||
:: lock-test-0 ( -- v )
|
:: lock-test-0 ( -- v )
|
||||||
[let | v [ V{ } clone ]
|
[let | v [ V{ } clone ]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: concurrency.mailboxes.tests
|
|
||||||
USING: concurrency.mailboxes concurrency.count-downs concurrency.conditions
|
USING: concurrency.mailboxes concurrency.count-downs concurrency.conditions
|
||||||
vectors sequences threads tools.test math kernel strings namespaces
|
vectors sequences threads tools.test math kernel strings namespaces
|
||||||
continuations calendar destructors ;
|
continuations calendar destructors ;
|
||||||
|
IN: concurrency.mailboxes.tests
|
||||||
|
|
||||||
{ 1 1 } [ [ integer? ] mailbox-get? ] must-infer-as
|
{ 1 1 } [ [ integer? ] mailbox-get? ] must-infer-as
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
! Copyright (C) 2005, 2008 Chris Double, Slava Pestov.
|
! Copyright (C) 2005, 2008 Chris Double, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
IN: concurrency.mailboxes
|
|
||||||
USING: dlists deques threads sequences continuations
|
USING: dlists deques threads sequences continuations
|
||||||
destructors namespaces math quotations words kernel
|
destructors namespaces math quotations words kernel
|
||||||
arrays assocs init system concurrency.conditions accessors
|
arrays assocs init system concurrency.conditions accessors
|
||||||
debugger debugger.threads locals fry ;
|
debugger debugger.threads locals fry ;
|
||||||
|
IN: concurrency.mailboxes
|
||||||
|
|
||||||
TUPLE: mailbox threads data disposed ;
|
TUPLE: mailbox threads data disposed ;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: concurrency.promises.tests
|
|
||||||
USING: vectors concurrency.promises kernel threads sequences
|
USING: vectors concurrency.promises kernel threads sequences
|
||||||
tools.test ;
|
tools.test ;
|
||||||
|
IN: concurrency.promises.tests
|
||||||
|
|
||||||
[ V{ 50 50 50 } ] [
|
[ V{ 50 50 50 } ] [
|
||||||
0 <vector>
|
0 <vector>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: cords.tests
|
|
||||||
USING: cords strings tools.test kernel sequences ;
|
USING: cords strings tools.test kernel sequences ;
|
||||||
|
IN: cords.tests
|
||||||
|
|
||||||
[ "hello world" ] [ "hello" " world" cord-append dup like ] unit-test
|
[ "hello world" ] [ "hello" " world" cord-append dup like ] unit-test
|
||||||
[ "hello world" ] [ { "he" "llo" " world" } cord-concat dup like ] unit-test
|
[ "hello world" ] [ { "he" "llo" " world" } cord-concat dup like ] unit-test
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test core-foundation.numbers ;
|
|
||||||
IN: core-foundation.numbers.tests
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test core-foundation.utilities ;
|
|
||||||
IN: core-foundation.utilities.tests
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test core-graphics.types ;
|
|
||||||
IN: core-graphics.types.tests
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test core-text.fonts ;
|
|
||||||
IN: core-text.fonts.tests
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test core-text.utilities ;
|
|
||||||
IN: core-text.utilities.tests
|
|
|
@ -1,7 +1,7 @@
|
||||||
IN: cpu.ppc.assembler.tests
|
|
||||||
USING: cpu.ppc.assembler tools.test arrays kernel namespaces
|
USING: cpu.ppc.assembler tools.test arrays kernel namespaces
|
||||||
make vocabs sequences ;
|
make vocabs sequences ;
|
||||||
FROM: cpu.ppc.assembler => B ;
|
FROM: cpu.ppc.assembler => B ;
|
||||||
|
IN: cpu.ppc.assembler.tests
|
||||||
|
|
||||||
: test-assembler ( expected quot -- )
|
: test-assembler ( expected quot -- )
|
||||||
[ 1array ] [ [ B{ } make ] curry ] bi* unit-test ;
|
[ 1array ] [ [ B{ } make ] curry ] bi* unit-test ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: cpu.x86.features.tests
|
|
||||||
USING: cpu.x86.features tools.test kernel sequences math system ;
|
USING: cpu.x86.features tools.test kernel sequences math system ;
|
||||||
|
IN: cpu.x86.features.tests
|
||||||
|
|
||||||
cpu x86? [
|
cpu x86? [
|
||||||
[ t ] [ sse2? { t f } member? ] unit-test
|
[ t ] [ sse2? { t f } member? ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: debugger.tests
|
|
||||||
USING: debugger kernel continuations tools.test ;
|
USING: debugger kernel continuations tools.test ;
|
||||||
|
IN: debugger.tests
|
||||||
|
|
||||||
[ ] [ [ drop ] [ error. ] recover ] unit-test
|
[ ] [ [ drop ] [ error. ] recover ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
||||||
USING: tools.test definitions.icons ;
|
|
||||||
IN: definitions.icons.tests
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: disjoint-sets.testes
|
|
||||||
USING: tools.test disjoint-sets namespaces slots.private ;
|
USING: tools.test disjoint-sets namespaces slots.private ;
|
||||||
|
IN: disjoint-sets.testes
|
||||||
|
|
||||||
SYMBOL: +blah+
|
SYMBOL: +blah+
|
||||||
-405534154 +blah+ 1 set-slot
|
-405534154 +blah+ 1 set-slot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: documents.tests
|
|
||||||
USING: documents documents.private accessors sequences
|
USING: documents documents.private accessors sequences
|
||||||
namespaces tools.test make arrays kernel fry ;
|
namespaces tools.test make arrays kernel fry ;
|
||||||
|
IN: documents.tests
|
||||||
|
|
||||||
! Tests
|
! Tests
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
USING: definitions io.launcher kernel math math.parser parser
|
USING: definitions io.launcher kernel math math.parser parser
|
||||||
namespaces prettyprint editors make ;
|
namespaces prettyprint editors make ;
|
||||||
|
|
||||||
IN: editors.macvim
|
IN: editors.macvim
|
||||||
|
|
||||||
: macvim ( file line -- )
|
: macvim ( file line -- )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: eval.tests
|
|
||||||
USING: eval tools.test ;
|
USING: eval tools.test ;
|
||||||
|
IN: eval.tests
|
||||||
|
|
||||||
[ 4 ] [ "USE: math 2 2 +" eval( -- result ) ] unit-test
|
[ 4 ] [ "USE: math 2 2 +" eval( -- result ) ] unit-test
|
||||||
[ "USE: math 2 2 +" eval( -- ) ] must-fail
|
[ "USE: math 2 2 +" eval( -- ) ] must-fail
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
! Copyright (C) 2008 John Benediktsson
|
! Copyright (C) 2008 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: calendar kernel formatting tools.test ;
|
USING: calendar kernel formatting tools.test ;
|
||||||
|
|
||||||
IN: formatting.tests
|
IN: formatting.tests
|
||||||
|
|
||||||
[ "%s" printf ] must-infer
|
[ "%s" printf ] must-infer
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
! Copyright (C) 2008 John Benediktsson
|
! Copyright (C) 2008 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: accessors arrays assocs calendar combinators fry kernel
|
USING: accessors arrays assocs calendar combinators fry kernel
|
||||||
generalizations io io.streams.string macros math math.functions
|
generalizations io io.streams.string macros math math.functions
|
||||||
math.parser peg.ebnf quotations sequences splitting strings
|
math.parser peg.ebnf quotations sequences splitting strings
|
||||||
unicode.categories unicode.case vectors combinators.smart ;
|
unicode.categories unicode.case vectors combinators.smart ;
|
||||||
|
|
||||||
IN: formatting
|
IN: formatting
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: fry.tests
|
|
||||||
USING: fry tools.test math prettyprint kernel io arrays
|
USING: fry tools.test math prettyprint kernel io arrays
|
||||||
sequences eval accessors ;
|
sequences eval accessors ;
|
||||||
|
IN: fry.tests
|
||||||
|
|
||||||
[ [ 3 + ] ] [ 3 '[ _ + ] ] unit-test
|
[ [ 3 + ] ] [ 3 '[ _ + ] ] unit-test
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue