The Trunk: SUnit-ul.89.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SUnit-ul.89.mcz

commits-2
Levente Uzonyi uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-ul.89.mcz

==================== Summary ====================

Name: SUnit-ul.89
Author: ul
Time: 21 September 2012, 3:50:20.289 am
UUID: 57658f3e-8679-3748-82a8-c805c9e0c42d
Ancestors: SUnit-ul.88

Accept a block (and strings as before) as description in TestCase >> #assert:description:. Instead of printing the objects all the time, only do that if the test fails in TestCase>>assert:equals: and TestCase>>assert:equals:description:.

=============== Diff against SUnit-ul.88 ===============

Item was changed:
  ----- Method: TestCase>>assert:description: (in category 'accessing') -----
+ assert: aBooleanOrBlock description: aStringOrBlock
+
- assert: aBooleanOrBlock description: aString
  aBooleanOrBlock value ifFalse: [
+ | description |
+ description := aStringOrBlock value.
+ self logFailure: description.
+ TestResult failure signal: description ]
- self logFailure: aString.
- TestResult failure signal: aString]
  !

Item was changed:
  ----- Method: TestCase>>assert:equals: (in category 'accessing') -----
  assert: expected equals: actual
+
+ ^self
+ assert: expected = actual
+ description: [ self comparingStringBetween: expected and: actual ]
- ^ self
- assert: (expected = actual)
- description: (self comparingStringBetween: expected and: actual)
  !

Item was changed:
  ----- Method: TestCase>>assert:equals:description: (in category 'accessing') -----
  assert: expected equals: actual description: aString
+
+ ^self
+ assert: expected = actual
+ description: [ aString , ': ', (self comparingStringBetween: expected and: actual) ]!
- ^ self
- assert: (expected = actual)
- description: aString , ': ', (self comparingStringBetween: expected and: actual)!