[Pharo-project] Issue 3391 in pharo: BlockClosure>>assertWithDescription: sends #logFailure:
Status: Accepted Owner: da...@teleport.com New issue 3391 by da...@teleport.com: BlockClosure>>assertWithDescription: sends #logFailure: http://code.google.com/p/pharo/issues/detail?id=3391 In a PharoCore image (Pharo1.1.1 #11414 or Pharo1.2a #12271) the only sender of #assertWithDescription: is RxMatcher>>split: ... which wouldn't be that bad, except that BlockClosure>>assertWithDescription: sends #logFailure: which is only implemented in TestCase .... Soooo, it appears that assertWithDescription: should only be sent from instances of TestCase (and send removed from RxMatcher>>split:) or the send of #logFailure: removed from BlockClosure>>assertWithDescription: ... Found this on in GemStone testing while trying to figure out a test case that would trigger a failure of #assertWithDescription:, which BTW, I couldn't do .... so the #assertWithDescription: is probably unnecessary (or we need a test case to trigger the assertion)...
Updates: Labels: Milestone-1.2 Comment #1 on issue 3391 by stephane.ducasse: BlockClosure>>assertWithDescription: sends #logFailure: http://code.google.com/p/pharo/issues/detail?id=3391 argh we should fix that!
Comment #2 on issue 3391 by stephane.ducasse: BlockClosure>>assertWithDescription: sends #logFailure: http://code.google.com/p/pharo/issues/detail?id=3391 I have no idea what would be logFailure: on Closure and I would like to avoid it.
Comment #3 on issue 3391 by stephane.ducasse: BlockClosure>>assertWithDescription: sends #logFailure: http://code.google.com/p/pharo/issues/detail?id=3391 The first thing I would do is assertWithDescription: aStringOrABlock self value ifFalse: [ |value| value := aStringOrABlock value. AssertionFailure signal: value] because logFailure: in anycase write to Transcript
Updates: Status: Closed Comment #4 on issue 3391 by marcus.denker: BlockClosure>>assertWithDescription: sends #logFailure: http://code.google.com/p/pharo/issues/detail?id=3391 I removed the call to #logFailure 12273
participants (1)
-
pharo@googlecode.com