summaryrefslogtreecommitdiff
path: root/Lisp/tests.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-08-12 19:41:02 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-08-12 19:41:02 +0200
commit048c5db4f7a732376f0a4526502e012a0f29e0c7 (patch)
tree69a9bf3e80fd9e633cfeaf925e4ab5379bed21d2 /Lisp/tests.lisp
parentdac89d30fa1e9eabcde3d522a6c5ca0471cce3b1 (diff)
Code cleanup, fix a couple of memory leaks.
darcs-hash:629e2764a4ce319c9a7d9bc3a22e6f254633c73f
Diffstat (limited to 'Lisp/tests.lisp')
-rw-r--r--Lisp/tests.lisp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Lisp/tests.lisp b/Lisp/tests.lisp
index 0cc7379..28c4c9f 100644
--- a/Lisp/tests.lisp
+++ b/Lisp/tests.lisp
@@ -18,6 +18,12 @@
())
+(defrandom-instance double objective-cl
+ (if (zerop (random 2))
+ (random most-positive-double-float)
+ (- (random (abs most-negative-double-float)))))
+
+
(deftestsuite base-functions (objective-cl)
()
(:equality-test #'objc-equal)
@@ -72,6 +78,18 @@
((ensure (typep [NSString isEqual: [NSObject self]] 'boolean)))))
+(deftestsuite numbers (objective-cl)
+ ()
+ (:equality-test #'objc-equal)
+ (:tests
+ ((ensure-same [[NSDecimalNumber
+ decimalNumberWithString:
+ [NSString stringWithCString:
+ "-12345"]]
+ doubleValue]
+ -12345d0))))
+
+
(deftestsuite exception-handling (objective-cl)
()
(:equality-test #'objc-equal)