From c133c16377e2680a4f0a3607ce0029bd59526b85 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 30 Mar 2016 18:43:14 -0700 Subject: [PATCH] core: Trim using lists from -tests and clean up a few irregularities. --- core/alien/alien-tests.factor | 7 +++---- core/arrays/arrays-tests.factor | 1 - core/assocs/assocs-tests.factor | 6 +++--- core/byte-arrays/byte-arrays-tests.factor | 1 - core/byte-vectors/byte-vectors-tests.factor | 4 ++-- core/checksums/crc32/crc32-tests.factor | 2 +- core/classes/algebra/algebra-tests.factor | 11 ++++------- core/classes/builtin/builtin-tests.factor | 2 +- core/classes/classes-tests.factor | 9 +++------ core/classes/error/error-tests.factor | 3 +-- .../classes/intersection/intersection-tests.factor | 3 +-- core/classes/maybe/maybe-tests.factor | 5 ++--- core/classes/mixin/mixin-tests.factor | 9 ++++----- core/classes/predicate/predicate-tests.factor | 5 ++--- core/classes/singleton/singleton-tests.factor | 2 +- core/classes/tuple/tuple-tests.factor | 14 ++++++-------- core/classes/union/union-tests.factor | 11 ++++------- core/combinators/combinators-tests.factor | 6 +++--- core/compiler/units/units-tests.factor | 4 ++-- core/continuations/continuations-tests.factor | 6 +++--- core/definitions/definitions-tests.factor | 4 ++-- core/destructors/destructors-tests.factor | 4 ++-- core/effects/effects-tests.factor | 4 ++-- core/generic/math/math-tests.factor | 3 +-- core/generic/parser/parser-tests.factor | 2 -- core/growable/growable-tests.factor | 3 +-- core/hash-sets/hash-sets-tests.factor | 5 ++--- core/hashtables/hashtables-tests.factor | 3 +-- core/io/encodings/ascii/ascii-tests.factor | 4 ++-- core/io/encodings/utf16/utf16-tests.factor | 6 ++---- core/io/encodings/utf16n/utf16n-tests.factor | 6 +++--- core/io/encodings/utf8/utf8-tests.factor | 4 ++-- core/io/io-tests.factor | 4 ++-- core/io/streams/byte-array/byte-array-tests.factor | 8 ++++---- core/kernel/kernel-tests.factor | 9 ++++----- core/layouts/layouts-tests.factor | 1 - core/make/make-tests.factor | 2 -- core/math/floats/floats-tests.factor | 5 ++--- core/math/integers/integers-tests.factor | 6 +++--- core/math/math-tests.factor | 2 +- core/math/order/order-tests.factor | 3 +-- core/math/parser/parser-tests.factor | 4 +--- core/math/ratios/ratios-tests.factor | 4 +--- core/memory/memory-tests.factor | 6 +++--- core/namespaces/namespaces-tests.factor | 2 +- core/parser/parser-tests.factor | 12 +++++------- core/quotations/quotations-tests.factor | 3 +-- core/sbufs/sbufs-tests.factor | 1 - core/sequences/sequences-tests.factor | 9 +++------ core/sets/sets-tests.factor | 4 ++-- core/slots/slots-tests.factor | 4 ++-- core/sorting/sorting-tests.factor | 5 ++--- core/source-files/errors/errors-tests.factor | 2 +- core/source-files/source-files-tests.factor | 5 ++--- core/splitting/splitting-tests.factor | 3 +-- core/strings/parser/parser-tests.factor | 4 +--- core/strings/strings-tests.factor | 8 ++++---- core/system/system-tests.factor | 1 - core/vectors/vectors-tests.factor | 6 ++---- core/vocabs/loader/loader-tests.factor | 11 +++++------ core/vocabs/parser/parser-tests.factor | 4 ++-- core/vocabs/vocabs-tests.factor | 4 +--- core/words/alias/alias-tests.factor | 2 +- core/words/constant/constant-tests.factor | 2 +- core/words/words-tests.factor | 7 +++---- 65 files changed, 128 insertions(+), 184 deletions(-) diff --git a/core/alien/alien-tests.factor b/core/alien/alien-tests.factor index ec44ed1acc..28b2fe6d77 100644 --- a/core/alien/alien-tests.factor +++ b/core/alien/alien-tests.factor @@ -1,7 +1,6 @@ -USING: accessors alien alien.accessors alien.c-types alien.libraries -alien.syntax arrays byte-arrays continuations fry kernel kernel.private -layouts libc math namespaces prettyprint sequences system tools.memory -tools.test ; +USING: accessors alien alien.accessors alien.c-types +alien.syntax byte-arrays continuations fry kernel layouts math +namespaces prettyprint sequences tools.memory tools.test ; QUALIFIED: sets IN: alien.tests diff --git a/core/arrays/arrays-tests.factor b/core/arrays/arrays-tests.factor index dc2683ee0f..e55c8bef2f 100644 --- a/core/arrays/arrays-tests.factor +++ b/core/arrays/arrays-tests.factor @@ -1,6 +1,5 @@ USING: accessors arrays kernel kernel.private layouts literals math sequences tools.test vectors ; -IN: arrays.tests [ -2 { "a" "b" "c" } nth ] must-fail [ 10 { "a" "b" "c" } nth ] must-fail diff --git a/core/assocs/assocs-tests.factor b/core/assocs/assocs-tests.factor index eb0d3b8ab2..1acd43dc00 100644 --- a/core/assocs/assocs-tests.factor +++ b/core/assocs/assocs-tests.factor @@ -1,6 +1,6 @@ -USING: kernel math namespaces make tools.test vectors sequences -sequences.private hashtables io prettyprint assocs -continuations specialized-arrays alien.c-types ; +USING: alien.c-types assocs kernel make math namespaces +sequences specialized-arrays tools.test ; +IN: assocs.tests SPECIALIZED-ARRAY: double IN: assocs.tests diff --git a/core/byte-arrays/byte-arrays-tests.factor b/core/byte-arrays/byte-arrays-tests.factor index a63d3c1d8f..0b3906250d 100644 --- a/core/byte-arrays/byte-arrays-tests.factor +++ b/core/byte-arrays/byte-arrays-tests.factor @@ -1,6 +1,5 @@ USING: byte-arrays kernel math sequences sequences.private tools.test ; -IN: byte-arrays.tests { 6 B{ 1 2 3 } } [ 6 B{ 1 2 3 } resize-byte-array diff --git a/core/byte-vectors/byte-vectors-tests.factor b/core/byte-vectors/byte-vectors-tests.factor index 58dd39a5d7..2c3ee98221 100644 --- a/core/byte-vectors/byte-vectors-tests.factor +++ b/core/byte-vectors/byte-vectors-tests.factor @@ -1,5 +1,5 @@ -USING: tools.test byte-vectors vectors sequences kernel -prettyprint math ; +USING: byte-vectors math prettyprint sequences tools.test +vectors ; IN: byte-vectors.tests { 0 } [ 123 length ] unit-test diff --git a/core/checksums/crc32/crc32-tests.factor b/core/checksums/crc32/crc32-tests.factor index 8922f5a206..a2dca2fe22 100644 --- a/core/checksums/crc32/crc32-tests.factor +++ b/core/checksums/crc32/crc32-tests.factor @@ -1,4 +1,4 @@ -USING: checksums checksums.crc32 kernel math tools.test namespaces ; +USING: checksums checksums.crc32 tools.test ; { B{ 0 0 0 0 } } [ "" crc32 checksum-bytes ] unit-test diff --git a/core/classes/algebra/algebra-tests.factor b/core/classes/algebra/algebra-tests.factor index 9403a890e6..d9ac9263ac 100644 --- a/core/classes/algebra/algebra-tests.factor +++ b/core/classes/algebra/algebra-tests.factor @@ -1,10 +1,7 @@ -USING: alien arrays definitions generic assocs hashtables io -kernel math namespaces parser prettyprint sequences strings -tools.test words quotations classes classes.algebra -classes.private classes.union classes.mixin classes.predicate -vectors source-files compiler.units growable random -stack-checker effects kernel.private sbufs math.order -classes.tuple accessors generic.private ; +USING: accessors arrays assocs classes classes.algebra +classes.tuple classes.union generic generic.private growable +kernel math prettyprint quotations random sbufs sequences +stack-checker strings tools.test vectors words ; IN: classes.algebra.tests TUPLE: first-one ; diff --git a/core/classes/builtin/builtin-tests.factor b/core/classes/builtin/builtin-tests.factor index 1d862a8240..acfa8725e2 100644 --- a/core/classes/builtin/builtin-tests.factor +++ b/core/classes/builtin/builtin-tests.factor @@ -1,4 +1,4 @@ -USING: tools.test words sequences kernel memory accessors ; +USING: accessors kernel memory sequences tools.test words ; IN: classes.builtin.tests { f } [ diff --git a/core/classes/classes-tests.factor b/core/classes/classes-tests.factor index 073c7c994d..dfc74fe69c 100644 --- a/core/classes/classes-tests.factor +++ b/core/classes/classes-tests.factor @@ -1,9 +1,6 @@ -USING: alien arrays generic assocs hashtables io -io.streams.string kernel math namespaces parser prettyprint -sequences strings tools.test vectors words quotations classes -classes.private classes.union classes.mixin classes.predicate -classes.algebra definitions source-files compiler.units -kernel.private sorting vocabs memory eval accessors sets ; +USING: assocs classes classes.private compiler.units definitions +eval generic io.streams.string kernel math multiline namespaces +parser sequences sets sorting tools.test vocabs words ; IN: classes.tests { t } [ 3 object instance? ] unit-test diff --git a/core/classes/error/error-tests.factor b/core/classes/error/error-tests.factor index a74febc42f..70d85f3bfe 100644 --- a/core/classes/error/error-tests.factor +++ b/core/classes/error/error-tests.factor @@ -1,8 +1,7 @@ ! Copyright (C) 2015 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors classes classes.error classes.tuple -compiler.units effects eval generic io.streams.string kernel -math namespaces parser tools.test words words.symbol ; +compiler.units effects eval generic kernel tools.test words ; IN: classes.error.tests ! Test error classes diff --git a/core/classes/intersection/intersection-tests.factor b/core/classes/intersection/intersection-tests.factor index b0749b8723..d8aeb472d6 100644 --- a/core/classes/intersection/intersection-tests.factor +++ b/core/classes/intersection/intersection-tests.factor @@ -1,5 +1,4 @@ -USING: kernel tools.test generic generic.standard classes math -accessors classes.intersection slots math.order ; +USING: accessors generic kernel math math.order slots tools.test ; IN: classes.intersection.tests TUPLE: a ; diff --git a/core/classes/maybe/maybe-tests.factor b/core/classes/maybe/maybe-tests.factor index 4ff2817905..fa26608833 100644 --- a/core/classes/maybe/maybe-tests.factor +++ b/core/classes/maybe/maybe-tests.factor @@ -1,8 +1,7 @@ ! Copyright (C) 2011 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: classes.maybe eval generic.single kernel tools.test -math classes accessors slots classes.algebra -classes.algebra.private ; +USING: accessors classes classes.algebra classes.algebra.private +classes.maybe eval generic.single kernel math slots tools.test ; IN: classes.maybe.tests { t } [ 3 maybe{ integer } instance? ] unit-test diff --git a/core/classes/mixin/mixin-tests.factor b/core/classes/mixin/mixin-tests.factor index fafab942ae..63d24fa4f2 100644 --- a/core/classes/mixin/mixin-tests.factor +++ b/core/classes/mixin/mixin-tests.factor @@ -1,8 +1,7 @@ -USING: alien arrays definitions generic assocs hashtables io kernel -math namespaces parser prettyprint sequences strings tools.test words -quotations classes classes.private classes.union classes.mixin -classes.predicate classes.algebra vectors source-files compiler.units -kernel.private sorting vocabs eval ; +USING: arrays assocs classes classes.algebra classes.mixin +compiler.units definitions eval hashtables io.streams.string +kernel math parser sequences source-files strings tools.test +vectors words ; IN: classes.mixin.tests ! Test mixins diff --git a/core/classes/predicate/predicate-tests.factor b/core/classes/predicate/predicate-tests.factor index bcd7751f9d..1246bb0802 100644 --- a/core/classes/predicate/predicate-tests.factor +++ b/core/classes/predicate/predicate-tests.factor @@ -1,6 +1,5 @@ -USING: math tools.test classes.algebra words kernel sequences assocs -accessors eval definitions compiler.units generic strings classes -generic.single ; +USING: accessors assocs classes classes.algebra compiler.units +eval generic.single kernel math strings tools.test words ; IN: classes.predicate.tests PREDICATE: negative < integer 0 < ; diff --git a/core/classes/singleton/singleton-tests.factor b/core/classes/singleton/singleton-tests.factor index d177e1854d..279ac39440 100644 --- a/core/classes/singleton/singleton-tests.factor +++ b/core/classes/singleton/singleton-tests.factor @@ -1,4 +1,4 @@ -USING: kernel classes.singleton tools.test prettyprint io.streams.string see ; +USING: classes.singleton io.streams.string kernel see tools.test ; IN: classes.singleton.tests { } [ SINGLETON: bzzt ] unit-test diff --git a/core/classes/tuple/tuple-tests.factor b/core/classes/tuple/tuple-tests.factor index 7c2c1f0ca1..0c1719c55d 100644 --- a/core/classes/tuple/tuple-tests.factor +++ b/core/classes/tuple/tuple-tests.factor @@ -1,13 +1,11 @@ USING: accessors arrays assocs calendar classes classes.algebra classes.private classes.tuple classes.tuple.private columns -compiler.errors compiler.units continuations definitions -effects eval generic generic.single generic.standard grouping -io.streams.string kernel kernel.private math math.constants -math.order namespaces parser parser.notes prettyprint -quotations random see sequences sequences.private slots -slots.private splitting strings summary threads tools.test -vectors vocabs words words.symbol fry literals memory -combinators.short-circuit ; +combinators.short-circuit compiler.errors compiler.units +definitions eval generic generic.single io.streams.string kernel +kernel.private literals math math.constants memory namespaces +parser parser.notes see sequences sequences.private slots +splitting strings threads tools.test vectors vocabs words +words.symbol ; IN: classes.tuple.tests TUPLE: rect x y w h ; diff --git a/core/classes/union/union-tests.factor b/core/classes/union/union-tests.factor index 9cd014c6d9..f08cde6cda 100644 --- a/core/classes/union/union-tests.factor +++ b/core/classes/union/union-tests.factor @@ -1,10 +1,7 @@ -USING: accessors alien arrays definitions generic assocs -hashtables io kernel math namespaces parser prettyprint -sequences strings tools.test vectors words quotations classes -classes.private classes.union classes.mixin classes.predicate -classes.algebra classes.union.private source-files -compiler.units kernel.private sorting vocabs io.streams.string -eval see math.private slots generic.single ; +USING: accessors alien assocs classes classes.algebra +classes.predicate classes.union classes.union.private +compiler.units eval io.streams.string kernel math math.private +parser quotations see sequences slots strings tools.test words ; IN: classes.union.tests ! DEFER: bah diff --git a/core/combinators/combinators-tests.factor b/core/combinators/combinators-tests.factor index dee0e2cec2..f428666a0d 100644 --- a/core/combinators/combinators-tests.factor +++ b/core/combinators/combinators-tests.factor @@ -1,6 +1,6 @@ -USING: alien strings kernel math tools.test io prettyprint -namespaces combinators words classes sequences accessors -math.functions arrays combinators.private stack-checker ; +USING: accessors arrays combinators combinators.private io +kernel math math.functions prettyprint sequences stack-checker +tools.test words ; IN: combinators.tests { 3 } [ 1 2 [ + ] call( x y -- z ) ] unit-test diff --git a/core/compiler/units/units-tests.factor b/core/compiler/units/units-tests.factor index 478a8d5f42..7a8bfc0d8d 100644 --- a/core/compiler/units/units-tests.factor +++ b/core/compiler/units/units-tests.factor @@ -1,5 +1,5 @@ -USING: compiler definitions compiler.units tools.test arrays sequences words kernel -accessors namespaces fry eval quotations math ; +USING: arrays compiler compiler.units definitions eval fry +kernel math namespaces quotations sequences tools.test words ; IN: compiler.units.tests [ [ [ ] define-temp ] with-compilation-unit ] must-infer diff --git a/core/continuations/continuations-tests.factor b/core/continuations/continuations-tests.factor index ce3f36ac3f..6ea528438a 100644 --- a/core/continuations/continuations-tests.factor +++ b/core/continuations/continuations-tests.factor @@ -1,6 +1,6 @@ -USING: accessors continuations debugger eval hashtables io -kernel kernel.private math memory namespaces sequences -tools.test vectors words ; +USING: accessors continuations debugger eval io kernel +kernel.private math memory namespaces sequences tools.test +vectors words ; IN: continuations.tests : (callcc1-test) ( n obj -- n' obj ) diff --git a/core/definitions/definitions-tests.factor b/core/definitions/definitions-tests.factor index 94f5075ac3..cf0c6daa4d 100644 --- a/core/definitions/definitions-tests.factor +++ b/core/definitions/definitions-tests.factor @@ -1,5 +1,5 @@ -USING: tools.test generic kernel definitions sequences -compiler.units words ; +USING: arrays bit-arrays byte-arrays compiler.units definitions +tools.test ; IN: definitions.tests GENERIC: some-generic ( a -- b ) diff --git a/core/destructors/destructors-tests.factor b/core/destructors/destructors-tests.factor index 78f06b252d..92ddde0e5b 100644 --- a/core/destructors/destructors-tests.factor +++ b/core/destructors/destructors-tests.factor @@ -1,5 +1,5 @@ -USING: destructors kernel tools.test continuations accessors -namespaces sequences destructors.private ; +USING: accessors continuations destructors destructors.private +kernel namespaces sequences tools.test ; IN: destructors.tests TUPLE: dispose-error ; diff --git a/core/effects/effects-tests.factor b/core/effects/effects-tests.factor index 247cb7720d..02ac4e26c8 100644 --- a/core/effects/effects-tests.factor +++ b/core/effects/effects-tests.factor @@ -1,5 +1,5 @@ -USING: effects effects.parser eval kernel tools.test prettyprint accessors -quotations sequences ; +USING: accessors effects effects.parser eval kernel prettyprint +sequences tools.test ; IN: effects.tests { t } [ { "a" } { "a" } { "a" "b" } { "a" "b" } effect<= ] unit-test diff --git a/core/generic/math/math-tests.factor b/core/generic/math/math-tests.factor index 4dd7e630ee..b3849cf16a 100644 --- a/core/generic/math/math-tests.factor +++ b/core/generic/math/math-tests.factor @@ -1,5 +1,4 @@ -USING: generic.math math tools.test kernel ; -IN: generic.math.tests +USING: generic.math kernel math tools.test ; ! Test math-combination { [ [ >float ] dip ] } [ \ real \ float math-upgrade ] unit-test diff --git a/core/generic/parser/parser-tests.factor b/core/generic/parser/parser-tests.factor index 0d813c3788..a9f3c6b325 100644 --- a/core/generic/parser/parser-tests.factor +++ b/core/generic/parser/parser-tests.factor @@ -1,7 +1,5 @@ USING: generic.parser tools.test ; -IN: generic.parser.tests - { t } [ ( -- ) ( -- ) method-effect= ] unit-test { t } [ ( a -- b ) ( x -- y ) method-effect= ] unit-test { f } [ ( a b -- c ) ( x -- y ) method-effect= ] unit-test diff --git a/core/growable/growable-tests.factor b/core/growable/growable-tests.factor index 3eb7bc5288..0dc10c600d 100644 --- a/core/growable/growable-tests.factor +++ b/core/growable/growable-tests.factor @@ -1,5 +1,4 @@ -USING: math sequences classes growable tools.test kernel -layouts ; +USING: classes kernel layouts math sequences tools.test ; IN: growable.tests ! erg found this one diff --git a/core/hash-sets/hash-sets-tests.factor b/core/hash-sets/hash-sets-tests.factor index 4b2f78aab3..46dc06849f 100644 --- a/core/hash-sets/hash-sets-tests.factor +++ b/core/hash-sets/hash-sets-tests.factor @@ -1,8 +1,7 @@ ! Copyright (C) 2010 Daniel Ehrenberg ! See http://factorcode.org/license.txt for BSD license. -USING: accessors fry hash-sets kernel math prettyprint -sequences sets sorting tools.test ; -IN: hash-sets.tests +USING: accessors fry hash-sets kernel math prettyprint sequences +sets sorting tools.test ; { { 1 2 3 } } [ HS{ 1 2 3 } members natural-sort ] unit-test diff --git a/core/hashtables/hashtables-tests.factor b/core/hashtables/hashtables-tests.factor index a3700dbd6e..a238eef90d 100644 --- a/core/hashtables/hashtables-tests.factor +++ b/core/hashtables/hashtables-tests.factor @@ -1,6 +1,5 @@ USING: accessors assocs continuations fry hashtables kernel make -math namespaces sequences slots.private tools.test ; -IN: hashtables.tests +math namespaces sequences tools.test ; { H{ } } [ { } [ dup ] H{ } map>assoc ] unit-test diff --git a/core/io/encodings/ascii/ascii-tests.factor b/core/io/encodings/ascii/ascii-tests.factor index f8de3e1fa6..d2818b0102 100644 --- a/core/io/encodings/ascii/ascii-tests.factor +++ b/core/io/encodings/ascii/ascii-tests.factor @@ -1,5 +1,5 @@ -USING: io.encodings.string io.encodings.ascii tools.test strings arrays ; -IN: io.encodings.ascii.tests +USING: arrays io.encodings.ascii io.encodings.string strings +tools.test ; { B{ CHAR: f CHAR: o CHAR: o } } [ "foo" ascii encode ] unit-test [ { 128 } >string ascii encode ] must-fail diff --git a/core/io/encodings/utf16/utf16-tests.factor b/core/io/encodings/utf16/utf16-tests.factor index a4938e32c2..0b704532d2 100644 --- a/core/io/encodings/utf16/utf16-tests.factor +++ b/core/io/encodings/utf16/utf16-tests.factor @@ -1,9 +1,7 @@ ! Copyright (C) 2008 Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel tools.test io.encodings.utf16 arrays sbufs -io.streams.byte-array sequences io.encodings io strings -io.encodings.string alien.c-types alien.strings accessors classes ; -IN: io.encodings.utf16.tests +USING: arrays io.encodings.string io.encodings.utf16 strings +tools.test ; { { CHAR: x } } [ B{ 0 CHAR: x } utf16be decode >array ] unit-test { { 0x1D11E } } [ B{ 0xD8 0x34 0xDD 0x1E } utf16be decode >array ] unit-test diff --git a/core/io/encodings/utf16n/utf16n-tests.factor b/core/io/encodings/utf16n/utf16n-tests.factor index 7778f7c67b..9e3170156b 100644 --- a/core/io/encodings/utf16n/utf16n-tests.factor +++ b/core/io/encodings/utf16n/utf16n-tests.factor @@ -1,6 +1,6 @@ -USING: accessors alien.c-types alien.data kernel -io.encodings.utf16 io.streams.byte-array tools.test ; -IN: io.encodings.utf16n +USING: accessors alien.data io.encodings.utf16 +io.streams.byte-array kernel tools.test ; +IN: io.encodings.utf16n.tests : correct-endian ( obj -- ? ) code>> little-endian? [ utf16le = ] [ utf16be = ] if ; diff --git a/core/io/encodings/utf8/utf8-tests.factor b/core/io/encodings/utf8/utf8-tests.factor index 468c69a3ce..efeeb708d0 100644 --- a/core/io/encodings/utf8/utf8-tests.factor +++ b/core/io/encodings/utf8/utf8-tests.factor @@ -1,5 +1,5 @@ -USING: io.encodings.utf8 tools.test io.encodings.string strings arrays -bootstrap.unicode kernel sequences ; +USING: arrays io.encodings.string io.encodings.utf8 kernel +sequences strings tools.test ; IN: io.encodings.utf8.tests : decode-utf8-w/stream ( array -- newarray ) diff --git a/core/io/io-tests.factor b/core/io/io-tests.factor index b4e3c9c715..98a43975a3 100644 --- a/core/io/io-tests.factor +++ b/core/io/io-tests.factor @@ -1,5 +1,5 @@ -USING: accessors io io.streams.string kernel math parser sbufs -sequences tools.test words namespaces strings ; +USING: accessors io io.streams.string kernel math namespaces +parser sbufs sequences strings tools.test words ; IN: io.tests { f } [ diff --git a/core/io/streams/byte-array/byte-array-tests.factor b/core/io/streams/byte-array/byte-array-tests.factor index d8f3e15f65..8f0bb63a75 100644 --- a/core/io/streams/byte-array/byte-array-tests.factor +++ b/core/io/streams/byte-array/byte-array-tests.factor @@ -1,8 +1,8 @@ -USING: tools.test io.streams.byte-array io.encodings.binary -io.encodings.utf8 io kernel arrays strings namespaces math -specialized-arrays alien.c-types alien.data io.encodings.ascii ; -SPECIALIZED-ARRAY: int +USING: alien.c-types alien.data arrays io io.encodings.ascii +io.encodings.binary io.encodings.utf8 io.streams.byte-array +kernel math specialized-arrays strings tools.test ; IN: io.streams.byte-array.tests +SPECIALIZED-ARRAY: int { B{ } } [ B{ } binary [ contents ] with-byte-reader ] unit-test diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index f779a8744e..bbbe94adc0 100644 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -1,8 +1,7 @@ -USING: arrays byte-arrays kernel kernel.private literals math -memory namespaces sequences tools.test math.private quotations -continuations prettyprint io.streams.string debugger assocs -sequences.private accessors locals.backend grouping words -system alien alien.accessors kernel.private ; +USING: accessors alien alien.accessors arrays assocs byte-arrays +continuations debugger grouping io.streams.string kernel +kernel.private literals locals.backend math memory namespaces +prettyprint sequences sequences.private tools.test words ; IN: kernel.tests { 0 } [ f size ] unit-test diff --git a/core/layouts/layouts-tests.factor b/core/layouts/layouts-tests.factor index 5c9b5fd29f..98bdc92e44 100644 --- a/core/layouts/layouts-tests.factor +++ b/core/layouts/layouts-tests.factor @@ -1,5 +1,4 @@ USING: layouts math tools.test ; -IN: system.tests { t } [ cell integer? ] unit-test { t } [ bootstrap-cell integer? ] unit-test diff --git a/core/make/make-tests.factor b/core/make/make-tests.factor index cb05afe559..d61638ae5b 100644 --- a/core/make/make-tests.factor +++ b/core/make/make-tests.factor @@ -1,6 +1,4 @@ - USING: make sequences tools.test ; -IN: make { "ABCD" } [ [ "ABCD" [ , ] each ] "" make ] unit-test diff --git a/core/math/floats/floats-tests.factor b/core/math/floats/floats-tests.factor index 88169ec5b9..8350a297b5 100644 --- a/core/math/floats/floats-tests.factor +++ b/core/math/floats/floats-tests.factor @@ -1,6 +1,5 @@ -USING: kernel math math.constants math.order tools.test sequences -grouping ; -IN: math.floats.tests +USING: grouping kernel math math.constants math.order sequences +tools.test ; { t } [ 0.0 float? ] unit-test { t } [ 3.1415 number? ] unit-test diff --git a/core/math/integers/integers-tests.factor b/core/math/integers/integers-tests.factor index ddb6c908db..0786bfda20 100644 --- a/core/math/integers/integers-tests.factor +++ b/core/math/integers/integers-tests.factor @@ -1,6 +1,6 @@ -USING: kernel math math.functions math.order namespaces -prettyprint math.private continuations tools.test sequences -random prettyprint.config ; +USING: continuations kernel math math.functions math.order +math.private namespaces prettyprint prettyprint.config random +sequences tools.test ; IN: math.integers.tests 10 number-base [ diff --git a/core/math/math-tests.factor b/core/math/math-tests.factor index d748750259..5c309c92dc 100644 --- a/core/math/math-tests.factor +++ b/core/math/math-tests.factor @@ -1,4 +1,4 @@ -USING: kernel layouts math math.private namespaces make tools.test ; +USING: kernel layouts make math math.private tools.test ; IN: math.tests { } [ 5 [ ] times ] unit-test diff --git a/core/math/order/order-tests.factor b/core/math/order/order-tests.factor index 9a896f0fad..b05d4cc35e 100644 --- a/core/math/order/order-tests.factor +++ b/core/math/order/order-tests.factor @@ -1,5 +1,4 @@ -USING: kernel math.order tools.test ; -IN: math.order.tests +USING: math.order tools.test ; { +lt+ } [ "ab" "abc" <=> ] unit-test { +gt+ } [ "abc" "ab" <=> ] unit-test diff --git a/core/math/parser/parser-tests.factor b/core/math/parser/parser-tests.factor index d67fb15c32..5dca74660c 100644 --- a/core/math/parser/parser-tests.factor +++ b/core/math/parser/parser-tests.factor @@ -1,6 +1,4 @@ -USING: kernel layouts literals math math.parser sequences -tools.test ; -IN: math.parser.tests +USING: layouts literals math math.parser sequences tools.test ; { f } [ f string>number ] diff --git a/core/math/ratios/ratios-tests.factor b/core/math/ratios/ratios-tests.factor index 0b44e95f1f..9983351d89 100644 --- a/core/math/ratios/ratios-tests.factor +++ b/core/math/ratios/ratios-tests.factor @@ -1,6 +1,4 @@ -USING: kernel math math.order math.parser math.ratios -math.functions tools.test ; -IN: math.ratios.tests +USING: kernel math math.functions math.parser tools.test ; { 1 2 } [ 1/2 >fraction ] unit-test diff --git a/core/memory/memory-tests.factor b/core/memory/memory-tests.factor index 07e82204f6..4e858f3b39 100644 --- a/core/memory/memory-tests.factor +++ b/core/memory/memory-tests.factor @@ -1,6 +1,6 @@ -USING: accessors byte-arrays effects kernel kernel.private math memory -prettyprint io sequences tools.test words namespaces layouts classes -classes.builtin arrays quotations system ; +USING: accessors arrays byte-arrays effects kernel +kernel.private math memory namespaces quotations sequences +tools.test words ; FROM: tools.memory => data-room code-room ; IN: memory.tests diff --git a/core/namespaces/namespaces-tests.factor b/core/namespaces/namespaces-tests.factor index 08aef97fdc..48f3b1cf12 100644 --- a/core/namespaces/namespaces-tests.factor +++ b/core/namespaces/namespaces-tests.factor @@ -1,5 +1,5 @@ USING: assocs compiler.tree.debugger kernel namespaces -tools.test words ; +tools.test ; IN: namespaces.tests H{ } clone "test-namespace" set diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index e60333519c..8f0d78b023 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -1,10 +1,8 @@ -USING: arrays math parser tools.test kernel generic words -io.streams.string namespaces classes effects source-files assocs -sequences strings io.files io.pathnames definitions -continuations sorting classes.tuple compiler.units debugger -vocabs vocabs.loader accessors eval combinators lexer -vocabs.parser words.symbol multiline source-files.errors -tools.crossref grouping sets ; +USING: accessors arrays assocs classes compiler.units effects +eval generic grouping io.pathnames io.streams.string kernel +lexer math multiline namespaces parser sequences sets +source-files source-files.errors strings tools.crossref +tools.test vocabs vocabs.parser words words.symbol ; IN: parser.tests { 1 [ 2 [ 3 ] 4 ] 5 } diff --git a/core/quotations/quotations-tests.factor b/core/quotations/quotations-tests.factor index 9093e9960e..4deb0769bc 100644 --- a/core/quotations/quotations-tests.factor +++ b/core/quotations/quotations-tests.factor @@ -1,5 +1,4 @@ -USING: math kernel quotations tools.test sequences ; -IN: quotations.tests +USING: kernel math quotations sequences tools.test ; { [ 3 ] } [ 3 [ ] curry ] unit-test { [ \ + ] } [ \ + [ ] curry ] unit-test diff --git a/core/sbufs/sbufs-tests.factor b/core/sbufs/sbufs-tests.factor index 9d4c76b88a..06212ddb0c 100644 --- a/core/sbufs/sbufs-tests.factor +++ b/core/sbufs/sbufs-tests.factor @@ -1,6 +1,5 @@ USING: classes kernel math namespaces sbufs sequences sequences.private strings tools.test ; -IN: sbufs.tests { 5 } [ "Hello" >sbuf length ] unit-test diff --git a/core/sequences/sequences-tests.factor b/core/sequences/sequences-tests.factor index baf2b8bbe1..cada259e75 100644 --- a/core/sequences/sequences-tests.factor +++ b/core/sequences/sequences-tests.factor @@ -1,7 +1,6 @@ -USING: arrays byte-arrays kernel math math.order math.parser -namespaces sequences kernel.private sequences.private strings -sbufs tools.test vectors assocs generic vocabs.loader -generic.single math.vectors math.functions ; +USING: arrays assocs byte-arrays generic.single kernel make math +math.functions math.order math.parser math.vectors sbufs +sequences sequences.private strings tools.test vectors ; IN: sequences.tests { "empty" } [ { } [ "empty" ] [ "not empty" ] if-empty ] unit-test @@ -345,8 +344,6 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ; { 1 2 3 4 5 6 7 8 } [ H{ { 11 "hi" } } at ] map-find ] unit-test -USE: make - { { "a" 1 "b" 1 "c" } } [ 1 { "a" "b" "c" } [ [ dup , ] [ , ] interleave drop ] { } make ] unit-test diff --git a/core/sets/sets-tests.factor b/core/sets/sets-tests.factor index 40ad691842..1a109c1da6 100644 --- a/core/sets/sets-tests.factor +++ b/core/sets/sets-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2010 Daniel Ehrenberg, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: sets tools.test kernel prettyprint hash-sets sorting -math sequences bit-sets bit-arrays ; +USING: bit-arrays bit-sets kernel math sequences sets sorting +tools.test ; IN: sets.tests { V{ 1 2 3 } } [ 3 V{ 1 2 } clone [ adjoin ] keep ] unit-test diff --git a/core/slots/slots-tests.factor b/core/slots/slots-tests.factor index 53c9c2fa1b..6405db4cad 100644 --- a/core/slots/slots-tests.factor +++ b/core/slots/slots-tests.factor @@ -1,5 +1,5 @@ -USING: math accessors slots strings generic.single kernel -tools.test generic words parser eval math.functions arrays ; +USING: accessors arrays generic.single kernel math +math.functions slots tools.test words ; IN: slots.tests TUPLE: r/w-test foo ; diff --git a/core/sorting/sorting-tests.factor b/core/sorting/sorting-tests.factor index 8c9a13a700..70716c905b 100644 --- a/core/sorting/sorting-tests.factor +++ b/core/sorting/sorting-tests.factor @@ -1,6 +1,5 @@ -USING: sorting sequences kernel math math.order random -tools.test vectors sets vocabs grouping ; -IN: sorting.tests +USING: grouping kernel math math.order random sequences sets +sorting tools.test vocabs ; { { } } [ { } natural-sort ] unit-test diff --git a/core/source-files/errors/errors-tests.factor b/core/source-files/errors/errors-tests.factor index 114d1d01ba..b96458fccb 100644 --- a/core/source-files/errors/errors-tests.factor +++ b/core/source-files/errors/errors-tests.factor @@ -1,5 +1,5 @@ USING: assocs compiler.errors compiler.units definitions -namespaces source-files.errors tools.test words ; +namespaces tools.test words ; IN: source-files.errors.tests DEFER: forget-test diff --git a/core/source-files/source-files-tests.factor b/core/source-files/source-files-tests.factor index 6810780724..118cf430ba 100644 --- a/core/source-files/source-files-tests.factor +++ b/core/source-files/source-files-tests.factor @@ -1,5 +1,4 @@ -IN: source-files.tests -USING: source-files tools.test assocs sequences strings -namespaces kernel ; +USING: assocs namespaces sequences source-files strings +tools.test ; { { } } [ source-files get keys [ string? ] reject ] unit-test diff --git a/core/splitting/splitting-tests.factor b/core/splitting/splitting-tests.factor index 4b871c6ee2..875f8061fd 100644 --- a/core/splitting/splitting-tests.factor +++ b/core/splitting/splitting-tests.factor @@ -1,5 +1,4 @@ -USING: splitting tools.test kernel sequences arrays strings ascii math ; -IN: splitting.tests +USING: ascii kernel math sequences splitting strings tools.test ; { "hello" "world ." } [ "hello world ." " " split1 ] unit-test { "hello" "world-+." } [ "hello-+world-+." "-+" split1 ] unit-test diff --git a/core/strings/parser/parser-tests.factor b/core/strings/parser/parser-tests.factor index dfc5c0efca..6e29b65976 100644 --- a/core/strings/parser/parser-tests.factor +++ b/core/strings/parser/parser-tests.factor @@ -1,6 +1,4 @@ -USING: accessors eval strings.parser strings.parser.private -tools.test ; -IN: strings.parser.tests +USING: eval strings.parser tools.test ; { "Hello\n\rworld" } [ "Hello\\n\\rworld" unescape-string ] unit-test diff --git a/core/strings/strings-tests.factor b/core/strings/strings-tests.factor index e676d92406..ae3b874620 100644 --- a/core/strings/strings-tests.factor +++ b/core/strings/strings-tests.factor @@ -1,7 +1,7 @@ -USING: continuations kernel literals math math.order namespaces make -strings strings.private sbufs tools.test sequences vectors -arrays memory prettyprint io.streams.null kernel.private ; -IN: strings.tests +USING: arrays continuations io.streams.null kernel +kernel.private literals make math math.order memory namespaces +prettyprint sbufs sequences strings strings.private tools.test +vectors ; { CHAR: b } [ 1 >bignum "abc" nth ] unit-test diff --git a/core/system/system-tests.factor b/core/system/system-tests.factor index 64f8410690..4e927777d5 100644 --- a/core/system/system-tests.factor +++ b/core/system/system-tests.factor @@ -1,5 +1,4 @@ USING: arrays sequences system tools.test ; -IN: system.tests { { t t t } } [ vm-version vm-compiler vm-compile-time 3array diff --git a/core/vectors/vectors-tests.factor b/core/vectors/vectors-tests.factor index 8bec970377..e208c29693 100644 --- a/core/vectors/vectors-tests.factor +++ b/core/vectors/vectors-tests.factor @@ -1,7 +1,5 @@ -USING: accessors arrays kernel kernel.private math namespaces -sequences sequences.private strings tools.test vectors -continuations random growable classes ; -IN: vectors.tests +USING: accessors arrays classes continuations kernel math +namespaces random sequences tools.test vectors ; { } [ 10 [ [ -1000000 ] ignore-errors ] times ] unit-test diff --git a/core/vocabs/loader/loader-tests.factor b/core/vocabs/loader/loader-tests.factor index 1738a90b4a..5f27237f8e 100644 --- a/core/vocabs/loader/loader-tests.factor +++ b/core/vocabs/loader/loader-tests.factor @@ -1,8 +1,7 @@ -USING: vocabs.loader tools.test continuations vocabs math -kernel arrays sequences namespaces io.streams.string sets -parser source-files words assocs classes.tuple definitions -debugger compiler.units accessors eval vocabs.hierarchy -combinators vocabs.parser grouping vocabs.files vocabs.refresh ; +USING: accessors compiler.units continuations debugger +definitions eval io.streams.string kernel math namespaces parser +prettyprint sequences sets source-files tools.test vocabs +vocabs.files vocabs.loader vocabs.parser vocabs.refresh words ; IN: vocabs.loader.tests ! This vocab should not exist, but just in case... @@ -46,7 +45,7 @@ IN: vocabs.loader.tests [ t ] [ "resource:core/vocabs/loader/test/a/a.factor" - path>source-file definitions>> dup USE: prettyprint . + path>source-file definitions>> "v-l-t-a-hello" "vocabs.loader.test.a" lookup-word dup . swap first in? ] unit-test diff --git a/core/vocabs/parser/parser-tests.factor b/core/vocabs/parser/parser-tests.factor index 1cd2d309a9..8d91e2d288 100644 --- a/core/vocabs/parser/parser-tests.factor +++ b/core/vocabs/parser/parser-tests.factor @@ -1,6 +1,6 @@ +USING: accessors compiler.units definitions eval kernel +tools.test vocabs vocabs.parser words ; IN: vocabs.parser.tests -USING: vocabs.parser tools.test eval kernel accessors definitions -compiler.units words vocabs ; [ "FROM: kernel => doesnotexist ;" eval( -- ) ] [ error>> T{ no-word-in-vocab { word "doesnotexist" } { vocab "kernel" } } = ] diff --git a/core/vocabs/vocabs-tests.factor b/core/vocabs/vocabs-tests.factor index 86d6d8cfe9..bcf131426b 100644 --- a/core/vocabs/vocabs-tests.factor +++ b/core/vocabs/vocabs-tests.factor @@ -1,6 +1,4 @@ -! Unit tests for vocabs vocabulary -USING: vocabs tools.test ; -IN: vocabs.tests +USING: tools.test vocabs ; { f } [ "kernel" vocab-main ] unit-test diff --git a/core/words/alias/alias-tests.factor b/core/words/alias/alias-tests.factor index 45be7e1a05..99471e355c 100644 --- a/core/words/alias/alias-tests.factor +++ b/core/words/alias/alias-tests.factor @@ -1,4 +1,4 @@ -USING: math eval lexer tools.test effects sequences ; +USING: effects eval math tools.test ; IN: words.alias.tests ALIAS: foo + diff --git a/core/words/constant/constant-tests.factor b/core/words/constant/constant-tests.factor index a1966ed89f..443ebbb32e 100644 --- a/core/words/constant/constant-tests.factor +++ b/core/words/constant/constant-tests.factor @@ -1,5 +1,5 @@ +USING: math tools.test words.constant ; IN: words.constant.tests -USING: tools.test math words.constant ; CONSTANT: a + diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index 0ca6b62936..b1bdde27b7 100644 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -1,7 +1,6 @@ -USING: arrays generic assocs kernel math namespaces -sequences tools.test words definitions parser quotations -vocabs continuations classes.tuple compiler.units -io.streams.string accessors eval words.symbol grouping ; +USING: accessors arrays compiler.units definitions eval generic +io.streams.string kernel math namespaces parser sequences +tools.test vocabs words words.symbol ; IN: words.tests { 4 } [