Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2009-03-26 20:20:06 -05:00
commit 6752704e77
2 changed files with 8 additions and 7 deletions

View File

@ -18,5 +18,4 @@ TUPLE: library path abi dll ;
library dup [ dll>> ] when ;
: add-library ( name path abi -- )
[ dup [ normalize-path ] when ] dip
<library> swap libraries get set-at ;

View File

@ -1,18 +1,20 @@
IN: compiler.tests
USING: alien alien.c-types alien.syntax compiler kernel
namespaces namespaces tools.test sequences stack-checker
stack-checker.errors words arrays parser quotations
continuations effects namespaces.private io io.streams.string
memory system threads tools.test math accessors combinators
specialized-arrays.float alien.libraries ;
specialized-arrays.float alien.libraries io.pathnames
io.backend ;
IN: compiler.tests
<<
: libfactor-ffi-tests-path ( -- string )
"resource:" normalize-path
{
{ [ os winnt? ] [ "resource:libfactor-ffi-test.dll" ] }
{ [ os macosx? ] [ "resource:libfactor-ffi-test.dylib" ] }
{ [ os unix? ] [ "resource:libfactor-ffi-test.so" ] }
} cond ;
{ [ os winnt? ] [ "libfactor-ffi-test.dll" ] }
{ [ os macosx? ] [ "libfactor-ffi-test.dylib" ] }
{ [ os unix? ] [ "libfactor-ffi-test.so" ] }
} cond append-path ;
"f-cdecl" libfactor-ffi-tests-path "cdecl" add-library