Permalink
Browse files

testcases showing the failing expression

  • Loading branch information...
1 parent 7024383 commit d318d451b63e57635ec78f994ce7ecbfaaefdffc @ksjogo ksjogo committed Mar 29, 2012
Showing with 6 additions and 3 deletions.
  1. +1 −1 nu/nu.nu
  2. +5 −2 nu/test.nu
View
@@ -116,7 +116,7 @@
(if (not (eval expression))
(then (throw ((NSException alloc)
initWithName:"NuAssertionFailure"
- reason:(expression stringValue)
+ reason:,(*body stringValue)
userInfo:nil)))))))
;; Allows mapping a function over multiple lists.
View
@@ -42,8 +42,11 @@
;; By overriding this method, we detect each time a class is defined in Nu that inherits from this class.
(+ (id) inheritedByClass:(id) testClass is
- (unless $testClasses (set $testClasses (NSMutableSet set)))
- ($testClasses addObject:testClass))
+ (unless $testClasses (set $testClasses (NSMutableSet set)))
+ ;; we need to check for the existence of testClass because reloading
+ ;; a file with a class definition will call this again but with nil
+ (if (testClass)
+ $testClasses addObject:testClass))
;; The setup method is called before each test case is executed.
;; The default implementation does nothing.

0 comments on commit d318d45

Please sign in to comment.