diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-10-04 16:57:36 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-10-04 16:57:36 +0200 |
commit | b8764bfc2acf5f569b864a8b30175d2285b529d7 (patch) | |
tree | 2235aa8ad5451309d8d5cf465f14fdf3d11c42f5 /Lisp/tests.lisp | |
parent | 2b699e8f4abc96ae57206250cf1e6e558089e2f7 (diff) |
Mimic the way PyObjC handles types.
darcs-hash:d7cf81f2dd93817e55a04816f3851fabce3dac55
Diffstat (limited to 'Lisp/tests.lisp')
-rw-r--r-- | Lisp/tests.lisp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/Lisp/tests.lisp b/Lisp/tests.lisp index b8ac773..c3e6e5a 100644 --- a/Lisp/tests.lisp +++ b/Lisp/tests.lisp @@ -96,7 +96,8 @@ "Klum."))) ((ensure-same +yes+ (primitive-invoke (find-objc-class 'ns-string) - :is-subclass-of-class :char + :is-subclass-of-class + (first (parse-typespec "c" t)) (find-objc-class 'ns-object)))) ;; performSelector:withObject: cannot be used with non-id return ;; types. @@ -169,13 +170,9 @@ '(pointer () (array () 100 (struct () "?" (:int ()) (:int ())))))) - ((ensure-same (parse-typespec "{?=BcCsSiIlLqQfd@#:*?}") + ((ensure-same (parse-typespec "{?=BiIlLqQfd@#:*?}") '(struct () "?" (:boolean ()) - (:char ()) - (:unsigned-char ()) - (:short ()) - (:unsigned-short ()) (:int ()) (:unsigned-int ()) (:long ()) @@ -187,6 +184,24 @@ (id ()) (objc-class ()) (selector ()) (:string ()) (:unknown ())))) + ((ensure (let ((funky-spec (parse-typespec "{?=cC}"))) + (member funky-spec + '((struct () "?" + (:char ()) + (:unsigned-char ())) + (struct () "?" + (:int ()) + (:unsigned-int ()))) + :test #'equalp)))) + ((ensure (let ((funky-spec (parse-typespec "{?=sS}"))) + (member funky-spec + '((struct () "?" + (:short ()) + (:unsigned-short ())) + (struct () "?" + (:int ()) + (:unsigned-int ()))) + :test #'equalp)))) ((ensure-same (parse-typespec "{Mulk=*{Untermulk={Unteruntermulk=}}i}") '(struct () "Mulk" (:string ()) |