diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-05 11:44:27 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-05 11:44:27 +0100 |
commit | 353af3ac726399fe7e5534dc5bea7d999d00113b (patch) | |
tree | ca57b25e2ee98550772792fa32830c6f67b656c7 | |
parent | 96ed1c189079219fd0772687839bfb4c7b7e3a27 (diff) |
Add test cases for the new method syntax.
darcs-hash:79e19eb625c3afd8628733f0985bd4f26d104b06
-rw-r--r-- | Lisp/tests.lisp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Lisp/tests.lisp b/Lisp/tests.lisp index 89593ca..cd138e5 100644 --- a/Lisp/tests.lisp +++ b/Lisp/tests.lisp @@ -29,7 +29,7 @@ #:foreign-class-registered-p #:define-objective-c-method #:defobjcmethod #:objective-c-generic-function #:objective-c-method - #:+nil+ #:+yes+ #:+no+)) + #:+nil+ #:+yes+ #:+no+ #:selector)) (in-package #:mulk.objective-cl.tests) (in-root-suite) @@ -370,6 +370,24 @@ #.(disable-objective-c-syntax) +#.(enable-method-syntax) +(deftest method-syntax () + (is (eq '#/stringWithCString:encoding: + 'objective-c-selectors:|stringWithCString:encoding:|)) + (is (fboundp '#/stringWithCString:encoding:)) + (is (typep (fdefinition '#/stringWithCString:encoding:) 'selector)) + (is (objc-equal (#/stringWithCString:encoding: (find-objc-class 'ns-string) + "Mulk." + 4) + (invoke (find-objc-class 'ns-string) + :string-with-c-string "Mulk." :encoding 4))) + (is (objc-equal (#/self (find-objc-class 'ns-array)) + (find-objc-class 'ns-array))) + (is (subtypep (#/class (#/new (find-objc-class 'ns-mutable-array))) + (find-objc-class 'ns-mutable-array)))) +#.(disable-method-syntax) + + (deftest compiler-macros () (flet ((compiler-macroexpand-1 (form &optional environment) (funcall (or (compiler-macro-function (car form)) |