Merge commit 'factor/master'

db4
Eduardo Cavazos 2009-01-14 01:58:17 -06:00
commit c466a79f28
9 changed files with 62 additions and 28 deletions

View File

@ -2,6 +2,4 @@ USING: vocabs vocabs.loader kernel ;
"math.ratios" require
"math.floats" require
"math.complex" require
"prettyprint" vocab [ "math.complex.prettyprint" require ] when
"math.complex" require

View File

@ -1,4 +1,4 @@
! Copyright (C) 2006, 2008 Slava Pestov.
! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel kernel.private math math.private
math.libm math.functions arrays math.functions.private sequences
@ -47,3 +47,9 @@ M: complex sqrt >polar [ fsqrt ] [ 2.0 / ] bi* polar> ;
IN: syntax
: C{ \ } [ first2 rect> ] parse-literal ; parsing
USE: prettyprint.custom
M: complex pprint* pprint-object ;
M: complex pprint-delims drop \ C{ \ } ;
M: complex >pprint-sequence >rect 2array ;

View File

@ -1,8 +0,0 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: math math.functions arrays prettyprint.custom kernel ;
IN: math.complex.prettyprint
M: complex pprint* pprint-object ;
M: complex pprint-delims drop \ C{ \ } ;
M: complex >pprint-sequence >rect 2array ;

View File

@ -3,17 +3,8 @@ USING: tools.test system io.pathnames io.files io.files.info
io.files.temp kernel tools.deploy.config
tools.deploy.config.editor tools.deploy.backend math sequences
io.launcher arrays namespaces continuations layouts accessors
io.encodings.ascii urls math.parser io.directories ;
: shake-and-bake ( vocab -- )
[ "test.image" temp-file delete-file ] ignore-errors
"resource:" [
[ vm "test.image" temp-file ] dip
dup deploy-config make-deploy-image
] with-directory ;
: small-enough? ( n -- ? )
[ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;
io.encodings.ascii urls math.parser io.directories
tools.deploy.test ;
[ t ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test
@ -36,11 +27,6 @@ os macosx? [
[ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
] when
: run-temp-image ( -- )
vm
"-i=" "test.image" temp-file append
2array try-process ;
{
"tools.deploy.test.1"
"tools.deploy.test.2"
@ -113,3 +99,8 @@ M: quit-responder call-responder*
"tools.deploy.test.9" shake-and-bake
run-temp-image
] unit-test
[ ] [
"tools.deploy.test.10" shake-and-bake
run-temp-image
] unit-test

View File

@ -0,0 +1,4 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test tools.deploy.test.10 ;
IN: tools.deploy.test.10.tests

View File

@ -0,0 +1,8 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: prettyprint ;
IN: tools.deploy.test.10
: main ( -- ) C{ 0 1 } pprint ;
MAIN: main

View File

@ -0,0 +1 @@
Slava Pestov

View File

@ -0,0 +1,15 @@
USING: tools.deploy.config ;
H{
{ deploy-reflection 3 }
{ deploy-unicode? f }
{ deploy-io 2 }
{ deploy-word-props? f }
{ deploy-compiler? f }
{ deploy-threads? f }
{ deploy-word-defs? f }
{ "stop-after-last-window?" t }
{ deploy-ui? f }
{ deploy-math? t }
{ deploy-c-types? f }
{ deploy-name "tools.deploy.test.10" }
}

View File

@ -0,0 +1,19 @@
USING: accessors arrays continuations io.directories io.files.info
io.files.temp io.launcher kernel layouts math sequences system
tools.deploy.backend tools.deploy.config.editor ;
IN: tools.deploy.test
: shake-and-bake ( vocab -- )
[ "test.image" temp-file delete-file ] ignore-errors
"resource:" [
[ vm "test.image" temp-file ] dip
dup deploy-config make-deploy-image
] with-directory ;
: small-enough? ( n -- ? )
[ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;
: run-temp-image ( -- )
vm
"-i=" "test.image" temp-file append
2array try-process ;