From 232d1d319c16c3e14232905271f1f331e9b3cf6b Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sun, 27 Sep 2009 17:41:18 -0500 Subject: [PATCH] update alien.c-types tests to use c-type words --- basis/alien/c-types/c-types-tests.factor | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) mode change 100644 => 100755 basis/alien/c-types/c-types-tests.factor diff --git a/basis/alien/c-types/c-types-tests.factor b/basis/alien/c-types/c-types-tests.factor old mode 100644 new mode 100755 index a893ffebe8..6c93b81fff --- a/basis/alien/c-types/c-types-tests.factor +++ b/basis/alien/c-types/c-types-tests.factor @@ -1,50 +1,50 @@ USING: alien alien.syntax alien.c-types kernel tools.test sequences system libc alien.strings io.encodings.utf8 -math.constants ; +math.constants classes.struct ; IN: alien.c-types.tests CONSTANT: xyz 123 -[ 492 ] [ { "int" xyz } heap-size ] unit-test +[ 492 ] [ { int xyz } heap-size ] unit-test [ -1 ] [ -1 *char ] unit-test [ -1 ] [ -1 *short ] unit-test [ -1 ] [ -1 *int ] unit-test -C-UNION: foo - "int" - "int" ; +UNION-STRUCT: foo + { a int } + { b int } ; -[ f ] [ "char*" c-type "void*" c-type eq? ] unit-test -[ t ] [ "char**" c-type "void*" c-type eq? ] unit-test +[ f ] [ "char*" parse-c-type c-type void* c-type eq? ] unit-test +[ t ] [ "char**" parse-c-type c-type void* c-type eq? ] unit-test -[ t ] [ "foo" heap-size "int" heap-size = ] unit-test +[ t ] [ foo heap-size int heap-size = ] unit-test TYPEDEF: int MyInt -[ t ] [ "int" c-type "MyInt" c-type eq? ] unit-test -[ t ] [ "void*" c-type "MyInt*" c-type eq? ] unit-test +[ t ] [ int c-type MyInt c-type eq? ] unit-test +[ t ] [ void* c-type "MyInt*" parse-c-type c-type eq? ] unit-test TYPEDEF: char MyChar -[ t ] [ "char" c-type "MyChar" c-type eq? ] unit-test -[ f ] [ "void*" c-type "MyChar*" c-type eq? ] unit-test -[ t ] [ "char*" c-type "MyChar*" c-type eq? ] unit-test +[ t ] [ char c-type MyChar c-type eq? ] unit-test +[ f ] [ void* c-type "MyChar*" parse-c-type c-type eq? ] unit-test +[ t ] [ "char*" parse-c-type c-type "MyChar*" parse-c-type c-type eq? ] unit-test -[ 32 ] [ { "int" 8 } heap-size ] unit-test +[ 32 ] [ { int 8 } heap-size ] unit-test TYPEDEF: char* MyString -[ t ] [ "char*" c-type "MyString" c-type eq? ] unit-test -[ t ] [ "void*" c-type "MyString*" c-type eq? ] unit-test +[ t ] [ char* c-type MyString c-type eq? ] unit-test +[ t ] [ void* c-type "MyString*" parse-c-type c-type eq? ] unit-test TYPEDEF: int* MyIntArray -[ t ] [ "void*" c-type "MyIntArray" c-type eq? ] unit-test +[ t ] [ void* c-type MyIntArray c-type eq? ] unit-test TYPEDEF: uchar* MyLPBYTE -[ t ] [ { char* utf8 } c-type "MyLPBYTE" c-type = ] unit-test +[ t ] [ { char* utf8 } c-type MyLPBYTE c-type = ] unit-test [ 0 B{ 1 2 3 4 }