Fix unit test failures caused by alien.data change
parent
75560699ea
commit
b0732bcb22
|
@ -1,7 +1,7 @@
|
||||||
USING: alien alien.c-types help.syntax help.markup libc
|
USING: alien alien.c-types help.syntax help.markup libc
|
||||||
kernel.private byte-arrays math strings hashtables alien.syntax
|
kernel.private byte-arrays math strings hashtables alien.syntax
|
||||||
alien.strings sequences io.encodings.string debugger destructors
|
alien.strings sequences io.encodings.string debugger destructors
|
||||||
vocabs.loader classes.struct quotations ;
|
vocabs.loader classes.struct quotations kernel ;
|
||||||
IN: alien.data
|
IN: alien.data
|
||||||
|
|
||||||
HELP: <c-array>
|
HELP: <c-array>
|
||||||
|
@ -189,14 +189,14 @@ $nl
|
||||||
"For example, if a C function returns a " { $link c-string } " but stipulates that the caller must deallocate the memory afterward, you must define the function as returning " { $snippet "char*" } " and call " { $link (free) } " yourself." ;
|
"For example, if a C function returns a " { $link c-string } " but stipulates that the caller must deallocate the memory afterward, you must define the function as returning " { $snippet "char*" } " and call " { $link (free) } " yourself." ;
|
||||||
|
|
||||||
HELP: <ref>
|
HELP: <ref>
|
||||||
{ $values { "c-type" "a C type" } }
|
{ $values { "value" object } { "c-type" "a C type" } { "c-ptr" c-ptr } }
|
||||||
{ $description "Creates a new byte array to store a Factor object as a C value." }
|
{ $description "Creates a new byte array to store a Factor object as a C value." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: alien.c-types alien.data prettyprint sequences ;" "123 int <ref> length ." "4" }
|
{ $example "USING: alien.c-types alien.data prettyprint sequences ;" "123 int <ref> length ." "4" }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: deref
|
HELP: deref
|
||||||
{ $values { "c-type" "a C type" } }
|
{ $values { "c-ptr" c-ptr } { "c-type" "a C type" } { "value" object } }
|
||||||
{ $description "Loads a C value from a byte array." }
|
{ $description "Loads a C value from a byte array." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: alien.c-types alien.data prettyprint sequences ;" "321 int <ref> int deref ." "321" }
|
{ $example "USING: alien.c-types alien.data prettyprint sequences ;" "321 int <ref> int deref ." "321" }
|
||||||
|
|
|
@ -1,31 +1,32 @@
|
||||||
USING: alien alien.c-types alien.data alien.syntax
|
USING: alien alien.data alien.syntax
|
||||||
classes.struct kernel sequences specialized-arrays
|
classes.struct kernel sequences specialized-arrays
|
||||||
specialized-arrays.private tools.test compiler.units vocabs ;
|
specialized-arrays.private tools.test compiler.units vocabs
|
||||||
|
system ;
|
||||||
|
QUALIFIED-WITH: alien.c-types c
|
||||||
IN: alien.data.tests
|
IN: alien.data.tests
|
||||||
|
|
||||||
|
[ -1 ] [ -1 c:char <ref> c:char deref ] unit-test
|
||||||
[ -1 ] [ -1 char <ref> char deref ] unit-test
|
[ -1 ] [ -1 c:short <ref> c:short deref ] unit-test
|
||||||
[ -1 ] [ -1 short <ref> short deref ] unit-test
|
[ -1 ] [ -1 c:int <ref> c:int deref ] unit-test
|
||||||
[ -1 ] [ -1 int <ref> int deref ] unit-test
|
|
||||||
|
|
||||||
! I don't care if this throws an error or works, but at least
|
! I don't care if this throws an error or works, but at least
|
||||||
! it should be consistent between platforms
|
! it should be consistent between platforms
|
||||||
[ -1 ] [ -1.0 int <ref> int deref ] unit-test
|
[ -1 ] [ -1.0 c:int <ref> c:int deref ] unit-test
|
||||||
[ -1 ] [ -1.0 long <ref> long deref ] unit-test
|
[ -1 ] [ -1.0 c:long <ref> c:long deref ] unit-test
|
||||||
[ -1 ] [ -1.0 longlong <ref> longlong deref ] unit-test
|
[ -1 ] [ -1.0 c:longlong <ref> c:longlong deref ] unit-test
|
||||||
[ 1 ] [ 1.0 uint <ref> uint deref ] unit-test
|
[ 1 ] [ 1.0 c:uint <ref> c:uint deref ] unit-test
|
||||||
[ 1 ] [ 1.0 ulong <ref> ulong deref ] unit-test
|
[ 1 ] [ 1.0 c:ulong <ref> c:ulong deref ] unit-test
|
||||||
[ 1 ] [ 1.0 ulonglong <ref> ulonglong deref ] unit-test
|
[ 1 ] [ 1.0 c:ulonglong <ref> c:ulonglong deref ] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
0 B{ 1 2 3 4 } <displaced-alien> void* <ref>
|
0 B{ 1 2 3 4 } <displaced-alien> c:void* <ref>
|
||||||
] must-fail
|
] must-fail
|
||||||
|
|
||||||
os windows? cpu x86.64? and [
|
os windows? cpu x86.64? and [
|
||||||
[ -2147467259 ] [ 2147500037 long <ref> long deref ] unit-test
|
[ -2147467259 ] [ 2147500037 c:long <ref> c:long deref ] unit-test
|
||||||
] when
|
] when
|
||||||
|
|
||||||
STRUCT: foo { a int } { b void* } { c bool } ;
|
STRUCT: foo { a c:int } { b c:void* } { c c:bool } ;
|
||||||
|
|
||||||
SPECIALIZED-ARRAY: foo
|
SPECIALIZED-ARRAY: foo
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ intel-unix-abi fortran-abi [
|
||||||
|
|
||||||
[ [
|
[ [
|
||||||
! [<fortran-result>]
|
! [<fortran-result>]
|
||||||
[ complex-float <c-object> ] 1 ndip
|
[ complex-float heap-size <byte-array> ] 1 ndip
|
||||||
! [fortran-args>c-args]
|
! [fortran-args>c-args]
|
||||||
{ [ { [ ] } spread ] [ { [ drop ] } spread ] } 1 ncleave
|
{ [ { [ ] } spread ] [ { [ drop ] } spread ] } 1 ncleave
|
||||||
! [fortran-invoke]
|
! [fortran-invoke]
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
USING: tools.test kernel.private kernel arrays sequences
|
USING: tools.test kernel.private kernel arrays sequences
|
||||||
math.private math generic words quotations alien alien.c-types
|
math.private math generic words quotations alien alien.c-types
|
||||||
strings sbufs sequences.private slots.private combinators
|
alien.data strings sbufs sequences.private slots.private
|
||||||
definitions system layouts vectors math.partial-dispatch
|
combinators definitions system layouts vectors
|
||||||
math.order math.functions accessors hashtables classes assocs
|
math.partial-dispatch math.order math.functions accessors
|
||||||
io.encodings.utf8 io.encodings.ascii io.encodings fry slots
|
hashtables classes assocs io.encodings.utf8 io.encodings.ascii
|
||||||
sorting.private combinators.short-circuit grouping prettyprint
|
io.encodings fry slots sorting.private combinators.short-circuit
|
||||||
generalizations
|
grouping prettyprint generalizations
|
||||||
compiler.tree
|
compiler.tree
|
||||||
compiler.tree.combinators
|
compiler.tree.combinators
|
||||||
compiler.tree.cleanup
|
compiler.tree.cleanup
|
||||||
|
@ -521,8 +521,6 @@ cell-bits 32 = [
|
||||||
] cleaned-up-tree nodes>quot
|
] cleaned-up-tree nodes>quot
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
USING: alien alien.c-types ;
|
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
[ int { } cdecl [ 2 2 + ] alien-callback ]
|
[ int { } cdecl [ 2 2 + ] alien-callback ]
|
||||||
{ + } inlined?
|
{ + } inlined?
|
||||||
|
|
|
@ -6,7 +6,8 @@ multiline eval words vocabs namespaces assocs prettyprint
|
||||||
alien.data math.vectors definitions compiler.test ;
|
alien.data math.vectors definitions compiler.test ;
|
||||||
FROM: specialized-arrays.private => specialized-array-vocab ;
|
FROM: specialized-arrays.private => specialized-array-vocab ;
|
||||||
FROM: alien.c-types => int float bool char float ulonglong ushort uint
|
FROM: alien.c-types => int float bool char float ulonglong ushort uint
|
||||||
heap-size little-endian? ;
|
heap-size ;
|
||||||
|
FROM: alien.data => little-endian? ;
|
||||||
IN: specialized-arrays.tests
|
IN: specialized-arrays.tests
|
||||||
|
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: accessors alien.c-types kernel
|
USING: accessors alien.c-types alien.data kernel
|
||||||
io.encodings.utf16 io.streams.byte-array tools.test ;
|
io.encodings.utf16 io.streams.byte-array tools.test ;
|
||||||
IN: io.encodings.utf16n
|
IN: io.encodings.utf16n
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue