From a70a2c0e31deac15a2921db4b0e81d81edc0228f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 30 Apr 2009 22:56:15 -0500 Subject: [PATCH] Fix some test failures and add an unportable tag --- basis/compiler/tests/call-effect.factor | 9 ++++++++- basis/delegate/delegate-tests.factor | 2 +- basis/stack-checker/call-effect/call-effect.factor | 2 +- core/io/files/files-tests.factor | 2 +- core/slots/slots-tests.factor | 2 +- core/strings/strings-tests.factor | 2 +- extra/modules/using/tests/tags.txt | 1 + 7 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 extra/modules/using/tests/tags.txt diff --git a/basis/compiler/tests/call-effect.factor b/basis/compiler/tests/call-effect.factor index 407250a685..a9fd313d64 100644 --- a/basis/compiler/tests/call-effect.factor +++ b/basis/compiler/tests/call-effect.factor @@ -4,4 +4,11 @@ USING: tools.test combinators generic.single sequences kernel ; : execute-ic-test ( a b -- c ) execute( a -- c ) ; ! VM type check error -[ 1 f execute-ic-test ] [ second 3 = ] must-fail-with \ No newline at end of file +[ 1 f execute-ic-test ] [ second 3 = ] must-fail-with + +: call-test ( q -- ) call( -- ) ; + +[ ] [ [ ] call-test ] unit-test +[ ] [ f [ drop ] curry call-test ] unit-test +[ ] [ [ ] [ ] compose call-test ] unit-test +[ [ 1 2 3 ] call-test ] [ wrong-values? ] must-fail-with \ No newline at end of file diff --git a/basis/delegate/delegate-tests.factor b/basis/delegate/delegate-tests.factor index f6a40d8dc8..9f9aca8702 100644 --- a/basis/delegate/delegate-tests.factor +++ b/basis/delegate/delegate-tests.factor @@ -1,6 +1,6 @@ USING: delegate kernel arrays tools.test words math definitions compiler.units parser generic prettyprint io.streams.string -accessors eval multiline generic.standard delegate.protocols +accessors eval multiline generic.single delegate.protocols delegate.private assocs see ; IN: delegate.tests diff --git a/basis/stack-checker/call-effect/call-effect.factor b/basis/stack-checker/call-effect/call-effect.factor index 4adc5952fd..b3b678d93d 100644 --- a/basis/stack-checker/call-effect/call-effect.factor +++ b/basis/stack-checker/call-effect/call-effect.factor @@ -19,7 +19,7 @@ IN: stack-checker.call-effect TUPLE: inline-cache value ; : cache-hit? ( word/quot ic -- ? ) - [ value>> ] [ value>> eq? ] bi and ; inline + [ value>> eq? ] [ value>> ] bi and ; inline SINGLETON: +unknown+ diff --git a/core/io/files/files-tests.factor b/core/io/files/files-tests.factor index 8f0fb9e97a..f57dafbdc6 100644 --- a/core/io/files/files-tests.factor +++ b/core/io/files/files-tests.factor @@ -1,7 +1,7 @@ USING: arrays debugger.threads destructors io io.directories io.encodings.8-bit io.encodings.ascii io.encodings.binary io.files io.files.private io.files.temp io.files.unique kernel -make math sequences system threads tools.test generic.standard ; +make math sequences system threads tools.test generic.single ; IN: io.files.tests [ ] [ "append-test" temp-file dup exists? [ delete-file ] [ drop ] if ] unit-test diff --git a/core/slots/slots-tests.factor b/core/slots/slots-tests.factor index 7ac8446842..1365e81524 100644 --- a/core/slots/slots-tests.factor +++ b/core/slots/slots-tests.factor @@ -1,5 +1,5 @@ IN: slots.tests -USING: math accessors slots strings generic.standard kernel +USING: math accessors slots strings generic.single kernel tools.test generic words parser eval math.functions ; TUPLE: r/w-test foo ; diff --git a/core/strings/strings-tests.factor b/core/strings/strings-tests.factor index 5b71b13552..22bf7bb821 100644 --- a/core/strings/strings-tests.factor +++ b/core/strings/strings-tests.factor @@ -58,7 +58,7 @@ unit-test [ "\u001234bc\0\0\0" ] [ 6 "\u001234bc" resize-string ] unit-test ! Random tester found this -[ 2 -7 resize-string ] [ { "kernel-error" 3 12 -7 } = ] must-fail-with +[ 2 -7 resize-string ] [ { "kernel-error" 3 11 -7 } = ] must-fail-with ! Make sure 24-bit strings work "hello world" "s" set diff --git a/extra/modules/using/tests/tags.txt b/extra/modules/using/tests/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/extra/modules/using/tests/tags.txt @@ -0,0 +1 @@ +unportable