gobject-introspection: remove tests (because they don't work);
parent
b67651b7ba
commit
7f2d5cd6ed
|
|
@ -1,267 +0,0 @@
|
|||
! Copyright (C) 2010 Anton Gorenko.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: glib.ffi gobject-introspection.tests.everything.ffi
|
||||
io.streams.string see tools.test ;
|
||||
IN: gobject-introspection.tests.godegen
|
||||
|
||||
! Constants
|
||||
|
||||
[ "IN: glib.ffi
|
||||
CONSTANT: G_ASCII_DTOSTR_BUF_SIZE 39 inline
|
||||
" ] [
|
||||
[ \ G_ASCII_DTOSTR_BUF_SIZE see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "IN: glib.ffi
|
||||
CONSTANT: G_CSET_a_2_z \"abcdefghijklmnopqrstuvwxyz\" inline
|
||||
" ] [
|
||||
[ \ G_CSET_a_2_z see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "IN: glib.ffi
|
||||
CONSTANT: G_E 2.71828182846 inline
|
||||
" ] [
|
||||
[ \ G_E see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! Enumerations
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
TYPEDEF: int TestEnum
|
||||
" ] [
|
||||
[ \ TestEnum see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "IN: gobject-introspection.tests.everything.ffi
|
||||
CONSTANT: TEST_VALUE1 0 inline
|
||||
" ] [
|
||||
[ \ TEST_VALUE1 see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "IN: gobject-introspection.tests.everything.ffi
|
||||
CONSTANT: TEST_VALUE3 42 inline
|
||||
" ] [
|
||||
[ \ TEST_VALUE3 see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! Bitfields
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
TYPEDEF: int TestFlags
|
||||
" ] [
|
||||
[ \ TestFlags see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "IN: gobject-introspection.tests.everything.ffi
|
||||
CONSTANT: TEST_FLAG2 2 inline
|
||||
" ] [
|
||||
[ \ TEST_FLAG2 see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! Functions
|
||||
|
||||
[ "USING: alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
gint test_int ( gint in ) ;
|
||||
" ] [
|
||||
[ \ test_int see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - throws
|
||||
|
||||
[ "USING: alien.c-types alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
gboolean test_torture_signature_1
|
||||
( int x, double* y, int* z, char* foo, int* q, guint m,
|
||||
GError** error ) ;
|
||||
" ] [
|
||||
[ \ test_torture_signature_1 see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! Records
|
||||
|
||||
[ "USING: alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
C-TYPE: TestSimpleBoxedA
|
||||
" ] [
|
||||
[ \ TestSimpleBoxedA see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: classes.struct glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
STRUCT: TestBoxed
|
||||
{ some_int8 gint8 initial: 0 }
|
||||
{ nested_a TestSimpleBoxedA } { priv TestBoxedPrivate* } ;
|
||||
" ] [
|
||||
[ \ TestBoxed see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - constructors
|
||||
|
||||
[ "USING: alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
TestBoxed* test_boxed_new ( ) ;
|
||||
" ] [
|
||||
[ \ test_boxed_new see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
TestBoxed* test_boxed_new_alternative_constructor1
|
||||
( int i ) ;
|
||||
" ] [
|
||||
[ \ test_boxed_new_alternative_constructor1 see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - functions
|
||||
|
||||
! - methods
|
||||
|
||||
[ "USING: alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
TestBoxed* test_boxed_copy ( TestBoxed* self ) ;
|
||||
" ] [
|
||||
[ \ test_boxed_copy see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
void test_struct_a_clone
|
||||
( TestStructA* self, TestStructA* a_out ) ;
|
||||
" ] [
|
||||
[ \ test_struct_a_clone see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! Classes
|
||||
|
||||
[ "USING: alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
C-TYPE: TestObj
|
||||
" ] [
|
||||
[ \ TestObj see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - get_type
|
||||
|
||||
[ "USING: alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
GType test_obj_get_type ( ) ;
|
||||
" ] [
|
||||
[ \ test_obj_get_type see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - constructors
|
||||
|
||||
[ "USING: alien.c-types alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
TestObj* test_obj_new_from_file ( char* x, GError** error )
|
||||
;
|
||||
" ] [
|
||||
[ \ test_obj_new_from_file see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
TestObj* test_obj_new_callback
|
||||
( TestCallbackUserData callback, gpointer user_data,
|
||||
GDestroyNotify notify ) ;
|
||||
" ] [
|
||||
[ \ test_obj_new_callback see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - functions
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
double test_obj_static_method ( int x ) ;
|
||||
" ] [
|
||||
[ \ test_obj_static_method see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
void test_obj_static_method_callback
|
||||
( TestCallback callback ) ;
|
||||
" ] [
|
||||
[ \ test_obj_static_method_callback see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - methods
|
||||
|
||||
[ "USING: alien.c-types alien.syntax gobject.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
void test_obj_set_bare ( TestObj* self, GObject* bare ) ;
|
||||
" ] [
|
||||
[ \ test_obj_set_bare see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
int test_obj_instance_method ( TestObj* self ) ;
|
||||
" ] [
|
||||
[ \ test_obj_instance_method see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything FUNCTION:
|
||||
gboolean test_obj_torture_signature_1
|
||||
( TestObj* self, int x, double* y, int* z, char* foo, int*
|
||||
q, guint m, GError** error ) ;
|
||||
" ] [
|
||||
[ \ test_obj_torture_signature_1 see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! - signals
|
||||
|
||||
[ "USING: alien.c-types alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything CALLBACK:
|
||||
void TestObj:test ( TestObj* sender, gpointer user_data ) ;
|
||||
" ] [
|
||||
[ \ TestObj:test see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything CALLBACK:
|
||||
void TestObj:test-with-static-scope-arg
|
||||
( TestObj* sender, TestSimpleBoxedA* object, gpointer
|
||||
user_data ) ;
|
||||
" ] [
|
||||
[ \ TestObj:test-with-static-scope-arg see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
! Callbacks
|
||||
|
||||
[ "USING: alien.c-types alien.syntax ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything CALLBACK:
|
||||
int TestCallback ( ) ;
|
||||
" ] [
|
||||
[ \ TestCallback see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
[ "USING: alien.c-types alien.syntax glib.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
LIBRARY: gobject-introspection.tests.everything CALLBACK:
|
||||
int TestCallbackUserData ( gpointer user_data ) ;
|
||||
" ] [
|
||||
[ \ TestCallbackUserData see ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +0,0 @@
|
|||
! Copyright (C) 2010 Anton Gorenko.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: gobject-introspection.tests.everything.ffi ;
|
||||
IN: gobject-introspection.tests.everything
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
! Copyright (C) 2010 Anton Gorenko.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien alien.c-types alien.libraries combinators kernel
|
||||
system
|
||||
gobject-introspection cairo.ffi gio.ffi glib.ffi gobject.ffi ;
|
||||
IN: gobject-introspection.tests.everything.ffi
|
||||
|
||||
<<
|
||||
"gobject-introspection.tests.everything" {
|
||||
{ [ os winnt? ] [ drop ] }
|
||||
{ [ os macosx? ] [ drop ] }
|
||||
{ [ os unix? ] [ "libgirepository-everything-1.0.so" cdecl add-library ] }
|
||||
} cond
|
||||
>>
|
||||
|
||||
IMPLEMENT-STRUCTS: TestBoxed ;
|
||||
|
||||
GIR: vocab:gobject-introspection/tests/everything/Everything-1.0.gir
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,19 +0,0 @@
|
|||
! Copyright (C) 2010 Anton Gorenko.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien alien.c-types alien.libraries combinators kernel
|
||||
system
|
||||
gobject-introspection glib.ffi gobject.ffi ;
|
||||
IN: gobject-introspection.tests.g-i-marshalling-tests.ffi
|
||||
|
||||
<<
|
||||
"gobject-introspection.tests.g-i-marshalling-tests" {
|
||||
{ [ os winnt? ] [ drop ] }
|
||||
{ [ os macosx? ] [ drop ] }
|
||||
{ [ os unix? ] [ "libgirepository-gimarshallingtests-1.0.so" cdecl add-library ] }
|
||||
} cond
|
||||
>>
|
||||
|
||||
IMPLEMENT-STRUCTS: GIMarshallingTestsSimpleStruct ;
|
||||
|
||||
GIR: vocab:gobject-introspection/tests/g-i-marshalling-tests/GIMarshallingTests-1.0.gir
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
! Copyright (C) 2010 Anton Gorenko.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: gobject-introspection.tests.g-i-marshalling-tests.ffi ;
|
||||
IN: gobject-introspection.tests.g-i-marshalling-tests
|
||||
|
||||
|
|
@ -1,295 +0,0 @@
|
|||
! Copyright (C) 2010 Anton Gorenko.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors alien.c-types alien.data alien.strings
|
||||
alien.syntax arrays classes.struct destructors
|
||||
gobject-introspection.tests.g-i-marshalling-tests.ffi
|
||||
glib.ffi gobject.ffi io.encodings.utf8 kernel literals
|
||||
sequences specialized-arrays tools.test ;
|
||||
IN: gobject-introspection.tests.marshalling
|
||||
|
||||
SPECIALIZED-ARRAYS: gint gshort void*
|
||||
GIMarshallingTestsSimpleStruct ;
|
||||
|
||||
CONSTANT: G_I_MARSHALLING_TESTS_CONSTANT_NUMBER 42
|
||||
|
||||
CONSTANT: G_I_MARSHALLING_TESTS_CONSTANT_UTF8 "const ♥ utf8"
|
||||
|
||||
! gboolean
|
||||
|
||||
[ t ] [ g_i_marshalling_tests_boolean_return_true ] unit-test
|
||||
[ f ] [ g_i_marshalling_tests_boolean_return_false ] unit-test
|
||||
|
||||
: boolean-out-true ( -- out )
|
||||
{ gboolean } [ g_i_marshalling_tests_boolean_out_true ]
|
||||
with-out-parameters ;
|
||||
[ t ] [ boolean-out-true ] unit-test
|
||||
|
||||
: boolean-out-false ( -- out )
|
||||
{ gboolean } [ g_i_marshalling_tests_boolean_out_false ]
|
||||
with-out-parameters ;
|
||||
[ f ] [ boolean-out-false ] unit-test
|
||||
|
||||
! gint8
|
||||
|
||||
[ $ G_MAXINT8 ] [ g_i_marshalling_tests_int8_return_max ] unit-test
|
||||
[ $ G_MININT8 ] [ g_i_marshalling_tests_int8_return_min ] unit-test
|
||||
|
||||
: int8-out-max ( -- out )
|
||||
{ gint8 } [ g_i_marshalling_tests_int8_out_max ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXINT8 ] [ int8-out-max ] unit-test
|
||||
|
||||
: int8-out-min ( -- out )
|
||||
{ gint8 } [ g_i_marshalling_tests_int8_out_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT8 ] [ int8-out-min ] unit-test
|
||||
|
||||
: int8-inout-max-min ( -- out )
|
||||
{ { gint8 initial: $ G_MAXINT8 } }
|
||||
[ g_i_marshalling_tests_int8_inout_max_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT8 ] [ int8-inout-max-min ] unit-test
|
||||
|
||||
! guint8
|
||||
|
||||
[ $ G_MAXUINT8 ] [ g_i_marshalling_tests_uint8_return ] unit-test
|
||||
|
||||
: uint8-out ( -- out )
|
||||
{ guint8 } [ g_i_marshalling_tests_uint8_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXUINT8 ] [ uint8-out ] unit-test
|
||||
|
||||
: uint8-inout ( -- out )
|
||||
{ { guint8 initial: $ G_MAXUINT8 } }
|
||||
[ g_i_marshalling_tests_uint8_inout ]
|
||||
with-out-parameters ;
|
||||
[ 0 ] [ uint8-inout ] unit-test
|
||||
|
||||
! gint16
|
||||
|
||||
[ $ G_MAXINT16 ] [ g_i_marshalling_tests_int16_return_max ] unit-test
|
||||
[ $ G_MININT16 ] [ g_i_marshalling_tests_int16_return_min ] unit-test
|
||||
|
||||
: int16-out-max ( -- out )
|
||||
{ gint16 } [ g_i_marshalling_tests_int16_out_max ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXINT16 ] [ int16-out-max ] unit-test
|
||||
|
||||
: int16-out-min ( -- out )
|
||||
{ gint16 } [ g_i_marshalling_tests_int16_out_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT16 ] [ int16-out-min ] unit-test
|
||||
|
||||
: int16-inout-max-min ( -- out )
|
||||
{ { gint16 initial: $ G_MAXINT16 } }
|
||||
[ g_i_marshalling_tests_int16_inout_max_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT16 ] [ int16-inout-max-min ] unit-test
|
||||
|
||||
! guint16
|
||||
|
||||
[ $ G_MAXUINT16 ] [ g_i_marshalling_tests_uint16_return ] unit-test
|
||||
|
||||
: uint16-out ( -- out )
|
||||
{ guint16 } [ g_i_marshalling_tests_uint16_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXUINT16 ] [ uint16-out ] unit-test
|
||||
|
||||
: uint16-inout ( -- out )
|
||||
{ { guint16 initial: $ G_MAXUINT16 } }
|
||||
[ g_i_marshalling_tests_uint16_inout ]
|
||||
with-out-parameters ;
|
||||
[ 0 ] [ uint16-inout ] unit-test
|
||||
|
||||
! gint32
|
||||
|
||||
[ $ G_MAXINT32 ] [ g_i_marshalling_tests_int32_return_max ] unit-test
|
||||
[ $ G_MININT32 ] [ g_i_marshalling_tests_int32_return_min ] unit-test
|
||||
|
||||
: int32-out-max ( -- out )
|
||||
{ gint32 } [ g_i_marshalling_tests_int32_out_max ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXINT32 ] [ int32-out-max ] unit-test
|
||||
|
||||
: int32-out-min ( -- out )
|
||||
{ gint32 } [ g_i_marshalling_tests_int32_out_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT32 ] [ int32-out-min ] unit-test
|
||||
|
||||
: int32-inout-max-min ( -- out )
|
||||
{ { gint32 initial: $ G_MAXINT32 } }
|
||||
[ g_i_marshalling_tests_int32_inout_max_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT32 ] [ int32-inout-max-min ] unit-test
|
||||
|
||||
! guint32
|
||||
|
||||
[ $ G_MAXUINT32 ] [ g_i_marshalling_tests_uint32_return ] unit-test
|
||||
|
||||
: uint32-out ( -- out )
|
||||
{ guint32 } [ g_i_marshalling_tests_uint32_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXUINT32 ] [ uint32-out ] unit-test
|
||||
|
||||
: uint32-inout ( -- out )
|
||||
{ { guint32 initial: $ G_MAXUINT32 } }
|
||||
[ g_i_marshalling_tests_uint32_inout ]
|
||||
with-out-parameters ;
|
||||
[ 0 ] [ uint32-inout ] unit-test
|
||||
|
||||
! gint64
|
||||
|
||||
[ $ G_MAXINT64 ] [ g_i_marshalling_tests_int64_return_max ] unit-test
|
||||
[ $ G_MININT64 ] [ g_i_marshalling_tests_int64_return_min ] unit-test
|
||||
|
||||
: int64-out-max ( -- out )
|
||||
{ gint64 } [ g_i_marshalling_tests_int64_out_max ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXINT64 ] [ int64-out-max ] unit-test
|
||||
|
||||
: int64-out-min ( -- out )
|
||||
{ gint64 } [ g_i_marshalling_tests_int64_out_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT64 ] [ int64-out-min ] unit-test
|
||||
|
||||
: int64-inout-max-min ( -- out )
|
||||
{ { gint64 initial: $ G_MAXINT64 } }
|
||||
[ g_i_marshalling_tests_int64_inout_max_min ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MININT64 ] [ int64-inout-max-min ] unit-test
|
||||
|
||||
! guint64
|
||||
|
||||
[ $ G_MAXUINT64 ] [ g_i_marshalling_tests_uint64_return ] unit-test
|
||||
|
||||
: uint64-out ( -- out )
|
||||
{ guint64 } [ g_i_marshalling_tests_uint64_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_MAXUINT64 ] [ uint64-out ] unit-test
|
||||
|
||||
: uint64-inout ( -- out )
|
||||
{ { guint64 initial: $ G_MAXUINT64 } }
|
||||
[ g_i_marshalling_tests_uint64_inout ]
|
||||
with-out-parameters ;
|
||||
[ 0 ] [ uint64-inout ] unit-test
|
||||
|
||||
! gssize
|
||||
! gsize
|
||||
! gfloat
|
||||
! gdouble
|
||||
! time_t
|
||||
|
||||
! gtype
|
||||
|
||||
[ $ G_TYPE_NONE ]
|
||||
[ g_i_marshalling_tests_gtype_return ] unit-test
|
||||
|
||||
: gtype-out ( -- out )
|
||||
{ GType } [ g_i_marshalling_tests_gtype_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_TYPE_NONE ] [ gtype-out ] unit-test
|
||||
|
||||
: gtype-inout ( -- out )
|
||||
{ { GType initial: $ G_TYPE_NONE } }
|
||||
[ g_i_marshalling_tests_gtype_inout ]
|
||||
with-out-parameters ;
|
||||
[ $ G_TYPE_INT ] [ gtype-inout ] unit-test
|
||||
|
||||
! strings
|
||||
|
||||
[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ]
|
||||
[ g_i_marshalling_tests_utf8_none_return utf8 alien>string ] unit-test
|
||||
|
||||
[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ] [
|
||||
[
|
||||
g_i_marshalling_tests_utf8_full_return &g_free
|
||||
utf8 alien>string
|
||||
] with-destructors
|
||||
] unit-test
|
||||
|
||||
: utf8-none-out ( -- out )
|
||||
{ pointer: gchar }
|
||||
[ g_i_marshalling_tests_utf8_none_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ]
|
||||
[ utf8-none-out utf8 alien>string ] unit-test
|
||||
|
||||
: utf8-full-out ( -- out )
|
||||
{ pointer: gchar }
|
||||
[ g_i_marshalling_tests_utf8_full_out ]
|
||||
with-out-parameters ;
|
||||
[ $ G_I_MARSHALLING_TESTS_CONSTANT_UTF8 ] [
|
||||
[ utf8-full-out &g_free utf8 alien>string ] with-destructors
|
||||
] unit-test
|
||||
|
||||
: utf8-dangling-out ( -- out )
|
||||
{ { pointer: gchar initial: f } }
|
||||
[ g_i_marshalling_tests_utf8_dangling_out ]
|
||||
with-out-parameters ;
|
||||
[ f ]
|
||||
[ utf8-dangling-out ] unit-test
|
||||
|
||||
! arrays
|
||||
|
||||
[ int-array{ -1 0 1 2 } ]
|
||||
[
|
||||
g_i_marshalling_tests_array_fixed_int_return
|
||||
4 <direct-int-array> >int-array
|
||||
] unit-test
|
||||
|
||||
[ short-array{ -1 0 1 2 } ]
|
||||
[
|
||||
g_i_marshalling_tests_array_fixed_short_return
|
||||
4 <direct-short-array> >short-array
|
||||
] unit-test
|
||||
|
||||
: array-fixed-out ( -- out )
|
||||
{ pointer: gint }
|
||||
[ g_i_marshalling_tests_array_fixed_out ]
|
||||
with-out-parameters ;
|
||||
[ int-array{ -1 0 1 2 } ]
|
||||
[
|
||||
array-fixed-out
|
||||
4 <direct-int-array> >int-array
|
||||
] unit-test
|
||||
|
||||
: array-fixed-out-struct ( -- out )
|
||||
{ pointer: gint }
|
||||
[ g_i_marshalling_tests_array_fixed_out_struct ]
|
||||
with-out-parameters ;
|
||||
[ { { 7 6 } { 6 7 } } ]
|
||||
[
|
||||
array-fixed-out-struct
|
||||
2 <direct-GIMarshallingTestsSimpleStruct-array>
|
||||
[ [ long_>> ] [ int8>> ] bi 2array ] { } map-as
|
||||
] unit-test
|
||||
|
||||
: array-return ( -- array length )
|
||||
{ gint }
|
||||
[ g_i_marshalling_tests_array_return ]
|
||||
with-out-parameters ;
|
||||
[ int-array{ -1 0 1 2 } ]
|
||||
[ array-return <direct-int-array> >int-array ] unit-test
|
||||
|
||||
: array-out ( -- array length )
|
||||
{ pointer: gint gint }
|
||||
[ g_i_marshalling_tests_array_out ]
|
||||
with-out-parameters ;
|
||||
[ int-array{ -1 0 1 2 } ]
|
||||
[ array-out <direct-int-array> >int-array ] unit-test
|
||||
|
||||
[ { "0" "1" "2" f } ]
|
||||
[
|
||||
g_i_marshalling_tests_array_zero_terminated_return
|
||||
4 <direct-void*-array> [ utf8 alien>string ] { } map-as
|
||||
] unit-test
|
||||
|
||||
: array-zero-terminated-out ( -- out )
|
||||
{ pointer: pointer: gchar }
|
||||
[ g_i_marshalling_tests_array_zero_terminated_out ]
|
||||
with-out-parameters ;
|
||||
[ { "0" "1" "2" f } ]
|
||||
[
|
||||
array-zero-terminated-out
|
||||
4 <direct-void*-array> [ utf8 alien>string ] { } map-as
|
||||
] unit-test
|
||||
Loading…
Reference in New Issue