From 8e3e67fad4a17482f2fde4da2e574fc7f717dd35 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 4 May 2009 13:10:56 -0500 Subject: [PATCH] Fix test failures --- basis/present/present-tests.factor | 2 +- basis/vocabs/files/files-tests.factor | 2 +- basis/vocabs/hierarchy/hierarchy-docs.factor | 2 +- basis/vocabs/refresh/refresh-tests.factor | 2 +- core/io/streams/c/c-docs.factor | 2 +- core/io/streams/c/c.factor | 2 +- core/math/parser/parser-docs.factor | 2 +- core/math/parser/parser.factor | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/basis/present/present-tests.factor b/basis/present/present-tests.factor index 559b9ac01d..e908fd8147 100644 --- a/basis/present/present-tests.factor +++ b/basis/present/present-tests.factor @@ -1,5 +1,5 @@ IN: present.tests -USING: tools.test present math vocabs sequences kernel ; +USING: tools.test vocabs.hierarchy present math vocabs sequences kernel ; [ "3" ] [ 3 present ] unit-test [ "Hi" ] [ "Hi" present ] unit-test diff --git a/basis/vocabs/files/files-tests.factor b/basis/vocabs/files/files-tests.factor index d53b8c52af..a12a9c957f 100644 --- a/basis/vocabs/files/files-tests.factor +++ b/basis/vocabs/files/files-tests.factor @@ -1,5 +1,5 @@ IN: vocabs.files.tests -USING: tools.test vocabs.files vocabs arrays sets ; +USING: tools.test vocabs.files vocabs arrays grouping ; [ t ] [ "kernel" vocab-files diff --git a/basis/vocabs/hierarchy/hierarchy-docs.factor b/basis/vocabs/hierarchy/hierarchy-docs.factor index c5d8554635..3bea362582 100644 --- a/basis/vocabs/hierarchy/hierarchy-docs.factor +++ b/basis/vocabs/hierarchy/hierarchy-docs.factor @@ -29,5 +29,5 @@ HELP: load-all { $description "Load all vocabularies in the source tree." } ; HELP: all-vocabs-under -{ $values { "prefix" string } } +{ $values { "prefix" string } { "vocabs" "a sequence of vocabularies" } } { $description "Return a sequence of vocab or vocab-links for each vocab matching the provided prefix. Unlike " { $link all-child-vocabs } " this word will return both loaded and unloaded vocabularies." } ; diff --git a/basis/vocabs/refresh/refresh-tests.factor b/basis/vocabs/refresh/refresh-tests.factor index fa9a66ae8e..ad8f005398 100644 --- a/basis/vocabs/refresh/refresh-tests.factor +++ b/basis/vocabs/refresh/refresh-tests.factor @@ -1,5 +1,5 @@ IN: vocabs.refresh.tests -USING: vocabs.refresh tools.test namespaces ; +USING: vocabs.refresh tools.test continuations namespaces ; [ ] [ changed-vocabs get-global diff --git a/core/io/streams/c/c-docs.factor b/core/io/streams/c/c-docs.factor index 41cc878c79..d23e8c2b16 100644 --- a/core/io/streams/c/c-docs.factor +++ b/core/io/streams/c/c-docs.factor @@ -30,7 +30,7 @@ HELP: { $description "Creates a stream which writes data by calling C standard library functions." } { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ; -HELP: fopen ( path mode -- alien ) +HELP: fopen { $values { "path" "a pathname string" } { "mode" "an access mode specifier" } { "alien" "a C FILE* handle" } } { $description "Opens a file named by " { $snippet "path" } ". The " { $snippet "mode" } " parameter should be something like " { $snippet "\"r\"" } " or " { $snippet "\"rw\"" } "; consult the " { $snippet "fopen(3)" } " manual page for details." } { $errors "Throws an error if the file could not be opened." } diff --git a/core/io/streams/c/c.factor b/core/io/streams/c/c.factor index e25db47cdf..d3fd593a7b 100755 --- a/core/io/streams/c/c.factor +++ b/core/io/streams/c/c.factor @@ -69,7 +69,7 @@ M: c-io-backend (init-stdio) init-c-stdio t ; M: c-io-backend io-multiplex 60 60 * 1000 * 1000 * or (sleep) ; -: fopen ( path mode -- handle ) +: fopen ( path mode -- alien ) [ utf8 string>alien ] bi@ (fopen) ; M: c-io-backend (file-reader) diff --git a/core/math/parser/parser-docs.factor b/core/math/parser/parser-docs.factor index beb2312f2a..1e3ff4f996 100644 --- a/core/math/parser/parser-docs.factor +++ b/core/math/parser/parser-docs.factor @@ -102,7 +102,7 @@ HELP: string>float ( str -- n/f ) $nl "Outputs " { $link f } " if the string does not represent a float." } ; -HELP: float>string ( n -- str ) +HELP: float>string { $values { "n" real } { "str" string } } { $description "Primitive for getting a string representation of a float." } { $notes "The " { $link number>string } " word is more general." } ; diff --git a/core/math/parser/parser.factor b/core/math/parser/parser.factor index 1736a00be4..437308d53f 100644 --- a/core/math/parser/parser.factor +++ b/core/math/parser/parser.factor @@ -152,7 +152,7 @@ M: ratio >base [ ".0" append ] } cond ; -: float>string ( x -- str ) +: float>string ( n -- str ) (float>string) [ 0 = ] trim-tail >string fix-float ;