Skip to content

Commit

Permalink
testcases showing the failing expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ksjogo committed Mar 29, 2012
1 parent 7024383 commit d318d45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nu/nu.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 5 additions & 2 deletions nu/test.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d318d45

Please sign in to comment.