Fixing unit tests for make, fry changes

db4
Slava Pestov 2008-09-11 00:20:06 -05:00
parent cf80dd122a
commit 0c8e2584b4
24 changed files with 41 additions and 70 deletions

View File

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

View File

@ -3,7 +3,7 @@ IN: compiler.tests
USING: compiler compiler.generator compiler.generator.registers USING: compiler compiler.generator compiler.generator.registers
compiler.generator.registers.private tools.test namespaces compiler.generator.registers.private tools.test namespaces
sequences words kernel math effects definitions compiler.units sequences words kernel math effects definitions compiler.units
accessors cpu.architecture ; accessors cpu.architecture make ;
: <int-vreg> ( n -- vreg ) int-regs <vreg> ; : <int-vreg> ( n -- vreg ) int-regs <vreg> ;

View File

@ -1,9 +1,8 @@
! Copyright (C) 2005 Chris Double. All Rights Reserved. ! Copyright (C) 2005 Chris Double. All Rights Reserved.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
! USING: kernel threads vectors arrays sequences namespaces make
USING: kernel threads vectors arrays sequences tools.test continuations deques strings math words match
namespaces tools.test continuations deques strings math words quotations concurrency.messaging concurrency.mailboxes
match quotations concurrency.messaging concurrency.mailboxes
concurrency.count-downs accessors ; concurrency.count-downs accessors ;
IN: concurrency.messaging.tests IN: concurrency.messaging.tests

View File

@ -1,6 +1,6 @@
IN: cpu.ppc.assembler.tests IN: cpu.ppc.assembler.tests
USING: cpu.ppc.assembler tools.test arrays kernel namespaces USING: cpu.ppc.assembler tools.test arrays kernel namespaces
vocabs sequences ; make vocabs sequences ;
: test-assembler ( expected quot -- ) : test-assembler ( expected quot -- )
[ 1array ] [ [ { } make ] curry ] bi* unit-test ; [ 1array ] [ [ { } make ] curry ] bi* unit-test ;

View File

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

View File

@ -33,7 +33,7 @@ sequences ;
] unit-test ] unit-test
[ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [ [ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
1 2 '[ [ _ ] dip , 3array ] 1 2 '[ [ _ ] dip _ 3array ]
{ "a" "b" "c" } swap map { "a" "b" "c" } swap map
] unit-test ] unit-test

View File

@ -1,10 +1,9 @@
IN: furnace.sessions.tests IN: furnace.sessions.tests
USING: tools.test http furnace.sessions USING: tools.test http furnace.sessions furnace.actions
furnace.actions http.server http.server.responses http.server http.server.responses math namespaces make kernel
math namespaces kernel accessors io.sockets io.servers.connection accessors io.sockets io.servers.connection prettyprint
prettyprint io.streams.string io.files splitting destructors io.streams.string io.files splitting destructors sequences db
sequences db db.tuples db.sqlite continuations urls math.parser db.tuples db.sqlite continuations urls math.parser furnace ;
furnace ;
: with-session : with-session
[ [

View File

@ -1,7 +1,7 @@
USING: io.files io.sockets io kernel threads USING: io.files io.sockets io kernel threads
namespaces tools.test continuations strings byte-arrays namespaces tools.test continuations strings byte-arrays
sequences prettyprint system io.encodings.binary io.encodings.ascii sequences prettyprint system io.encodings.binary io.encodings.ascii
io.streams.duplex destructors ; io.streams.duplex destructors make ;
IN: io.unix.tests IN: io.unix.tests
! Unix domain stream sockets ! Unix domain stream sockets

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Chris Double. ! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
! !
USING: kernel tools.test strings namespaces arrays sequences USING: kernel tools.test strings namespaces make arrays sequences
peg peg.private accessors words math accessors ; peg peg.private accessors words math accessors ;
IN: peg.tests IN: peg.tests

View File

@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint prettyprint.config
prettyprint.sections sequences tools.test vectors words prettyprint.sections sequences tools.test vectors words
effects splitting generic.standard prettyprint.private effects splitting generic.standard prettyprint.private
continuations generic compiler.units tools.walker eval continuations generic compiler.units tools.walker eval
accessors ; accessors make ;
IN: prettyprint.tests IN: prettyprint.tests
[ "4" ] [ 4 unparse ] unit-test [ "4" ] [ 4 unparse ] unit-test
@ -181,7 +181,7 @@ DEFER: parse-error-file
: another-soft-break-test : another-soft-break-test
{ {
"USING: namespaces sequences ;" "USING: make sequences ;"
"IN: prettyprint.tests" "IN: prettyprint.tests"
": another-soft-break-layout ( node -- quot )" ": another-soft-break-layout ( node -- quot )"
" parse-error-file" " parse-error-file"

View File

@ -1,31 +0,0 @@
USING: help.markup help.syntax math ;
IN: random.mersenne-twister
ARTICLE: "random-numbers" "Generating random integers"
"The " { $vocab-link "random" } " vocabulary implements the ``Mersenne Twister'' pseudo-random number generator algorithm."
! { $subsection init-random }
{ $subsection (random) }
{ $subsection random } ;
ABOUT: "random-numbers"
! HELP: init-random
! { $values { "seed" integer } }
! { $description "Initializes the random number generator with the given seed. This word is called on startup to initialize the random number generator with the current time." } ;
HELP: (random)
{ $values { "rand" "an integer between 0 and 2^32-1" } }
{ $description "Generates a random 32-bit unsigned integer." } ;
HELP: random
{ $values { "seq" "a sequence" } { "elt" "a random element" } }
{ $description "Outputs a random element of the sequence. If the sequence is empty, always outputs " { $link f } "." }
{ $notes "Since integers are sequences, passing an integer " { $snippet "n" } " yields a random integer in the interval " { $snippet "[0,n)" } "." } ;
HELP: big-random
{ $values { "n" "an integer" } { "r" "a random integer" } }
{ $description "Outputs an integer with n bytes worth of bits." } ;
HELP: random-256
{ $values { "r" "a random integer" } }
{ $description "Outputs an random integer 256 bits in length." } ;

View File

@ -1,5 +1,5 @@
USING: kernel math random namespaces random.mersenne-twister USING: kernel math random namespaces make
sequences tools.test math.order ; random.mersenne-twister sequences tools.test math.order ;
IN: random.mersenne-twister.tests IN: random.mersenne-twister.tests
: check-random ( max -- ? ) : check-random ( max -- ? )

View File

@ -1,5 +1,5 @@
USING: sequences.deep kernel tools.test strings math arrays USING: sequences.deep kernel tools.test strings math arrays
namespaces sequences ; namespaces make sequences ;
IN: sequences.deep.tests IN: sequences.deep.tests
[ [ "hello" 3 4 swap ] ] [ [ { "hello" V{ 3 4 } } swap ] flatten ] unit-test [ [ "hello" 3 4 swap ] ] [ [ { "hello" V{ 3 4 } } swap ] flatten ] unit-test

View File

@ -1,6 +1,6 @@
USING: accessors ui.gadgets ui.gadgets.labels namespaces sequences kernel USING: accessors ui.gadgets ui.gadgets.labels namespaces make
math arrays tools.test io ui.gadgets.panes ui.traverse sequences kernel math arrays tools.test io ui.gadgets.panes
definitions compiler.units ; ui.traverse definitions compiler.units ;
IN: ui.traverse.tests IN: ui.traverse.tests
M: array children>> ; M: array children>> ;

View File

@ -1,9 +1,10 @@
! Copyright (C) 2005, 2006 Daniel Ehrenberg ! Copyright (C) 2005, 2006 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
IN: xml.tests IN: xml.tests
USING: kernel xml tools.test io namespaces sequences xml.errors xml.entities USING: kernel xml tools.test io namespaces make sequences
parser strings xml.data io.files xml.writer xml.utilities state-parser xml.errors xml.entities parser strings xml.data io.files
continuations assocs sequences.deep accessors ; xml.writer xml.utilities state-parser continuations assocs
sequences.deep accessors ;
! This is insufficient ! This is insufficient
\ read-xml must-infer \ read-xml must-infer

View File

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

View File

@ -1,7 +1,7 @@
IN: generic.standard.tests IN: generic.standard.tests
USING: tools.test math math.functions math.constants USING: tools.test math math.functions math.constants
generic.standard strings sequences arrays kernel accessors generic.standard strings sequences arrays kernel accessors
words float-arrays byte-arrays bit-arrays parser namespaces words float-arrays byte-arrays bit-arrays parser namespaces make
quotations stack-checker vectors growable hashtables sbufs quotations stack-checker vectors growable hashtables sbufs
prettyprint byte-vectors bit-vectors float-vectors definitions prettyprint byte-vectors bit-vectors float-vectors definitions
generic sets graphs assocs ; generic sets graphs assocs ;

View File

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

View File

@ -1,5 +1,5 @@
USING: arrays io io.files kernel math parser strings system USING: arrays io io.files kernel math parser strings system
tools.test words namespaces io.encodings.8-bit tools.test words namespaces make io.encodings.8-bit
io.encodings.binary sequences ; io.encodings.binary sequences ;
IN: io.tests IN: io.tests

View File

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

View File

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

View File

@ -1,6 +1,6 @@
USING: continuations kernel math math.order namespaces strings USING: continuations kernel math math.order namespaces make
strings.private sbufs tools.test sequences vectors arrays memory strings strings.private sbufs tools.test sequences vectors
prettyprint io.streams.null ; arrays memory prettyprint io.streams.null ;
IN: strings.tests IN: strings.tests
[ CHAR: b ] [ 1 >bignum "abc" nth ] unit-test [ CHAR: b ] [ 1 >bignum "abc" nth ] unit-test

View File

@ -1,4 +1,5 @@
USING: accessors arrays bank calendar kernel math math.functions namespaces tools.test tools.walker ; USING: accessors arrays bank calendar kernel math math.functions
namespaces make tools.test tools.walker ;
IN: bank.tests IN: bank.tests
SYMBOL: my-account SYMBOL: my-account

View File

@ -1,4 +1,5 @@
USING: io io.streams.string kernel namespaces pack strings tools.test ; USING: io io.streams.string kernel namespaces make
pack strings tools.test ;
[ B{ 1 0 2 0 0 3 0 0 0 4 0 0 0 0 0 0 0 5 } ] [ [ B{ 1 0 2 0 0 3 0 0 0 4 0 0 0 0 0 0 0 5 } ] [
{ 1 2 3 4 5 } { 1 2 3 4 5 }