Permalink
Browse files

Changed RXAssertNil and RXAssertNotNil to stop using the ugly STAsser…

…t* assertions internally.
  • Loading branch information...
1 parent 5c548c7 commit 91cd3285fffa297b58ac4b1fe32c3dfe1eb7f50b @robrix committed Sep 27, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 RXAssertions.h
View
@@ -26,9 +26,9 @@
#define RXAssertNil(_thing) {\
__typeof__(_thing) __thing = (_thing);\
- STAssertNil(__thing, @"%s was unexpectedly %@, not nil.", #_thing, __thing);\
+ if(__thing != nil) STFail(@"%s was unexpectedly %@, not nil.", #_thing, __thing);\
}
-#define RXAssertNotNil(_thing) STAssertNotNil(_thing, @"%s was unexpectedly nil.", #_thing)
+#define RXAssertNotNil(_thing) if((_thing) == nil) STFail(@"%s was unexpectedly nil.", #_thing)
#define RXUnionCast(x, toType) (((union{__typeof__(x) a; toType b;})x).b)

0 comments on commit 91cd328

Please sign in to comment.