Fix test failures

db4
Slava Pestov 2009-05-04 13:10:56 -05:00
parent 3cb6d95a4f
commit 8e3e67fad4
8 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
IN: present.tests 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 [ "3" ] [ 3 present ] unit-test
[ "Hi" ] [ "Hi" present ] unit-test [ "Hi" ] [ "Hi" present ] unit-test

View File

@ -1,5 +1,5 @@
IN: vocabs.files.tests IN: vocabs.files.tests
USING: tools.test vocabs.files vocabs arrays sets ; USING: tools.test vocabs.files vocabs arrays grouping ;
[ t ] [ [ t ] [
"kernel" vocab-files "kernel" vocab-files

View File

@ -29,5 +29,5 @@ HELP: load-all
{ $description "Load all vocabularies in the source tree." } ; { $description "Load all vocabularies in the source tree." } ;
HELP: all-vocabs-under 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." } ; { $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." } ;

View File

@ -1,5 +1,5 @@
IN: vocabs.refresh.tests IN: vocabs.refresh.tests
USING: vocabs.refresh tools.test namespaces ; USING: vocabs.refresh tools.test continuations namespaces ;
[ ] [ [ ] [
changed-vocabs get-global changed-vocabs get-global

View File

@ -30,7 +30,7 @@ HELP: <c-writer>
{ $description "Creates a stream which writes data by calling C standard library functions." } { $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." } ; { $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" } } { $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." } { $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." } { $errors "Throws an error if the file could not be opened." }

View File

@ -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) ; 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) ; [ utf8 string>alien ] bi@ (fopen) ;
M: c-io-backend (file-reader) M: c-io-backend (file-reader)

View File

@ -102,7 +102,7 @@ HELP: string>float ( str -- n/f )
$nl $nl
"Outputs " { $link f } " if the string does not represent a float." } ; "Outputs " { $link f } " if the string does not represent a float." } ;
HELP: float>string ( n -- str ) HELP: float>string
{ $values { "n" real } { "str" string } } { $values { "n" real } { "str" string } }
{ $description "Primitive for getting a string representation of a float." } { $description "Primitive for getting a string representation of a float." }
{ $notes "The " { $link number>string } " word is more general." } ; { $notes "The " { $link number>string } " word is more general." } ;

View File

@ -152,7 +152,7 @@ M: ratio >base
[ ".0" append ] [ ".0" append ]
} cond ; } cond ;
: float>string ( x -- str ) : float>string ( n -- str )
(float>string) (float>string)
[ 0 = ] trim-tail >string [ 0 = ] trim-tail >string
fix-float ; fix-float ;