Levente Uzonyi uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-ul.103.mcz ==================== Summary ==================== Name: SUnit-ul.103 Author: ul Time: 14 August 2015, 7:03:21.454 pm UUID: 0adc8e0f-b262-4dd1-93fa-ec87ad5a67ed Ancestors: SUnit-mt.102 #includesSubString: -> #includesSubstring: =============== Diff against SUnit-mt.102 =============== Item was changed: ----- Method: SUnitTest>>testAssertIdentical (in category 'testing') ----- testAssertIdentical | a b | a := 'foo'. b := 'bar'. self should: [self assert: a identical: b] raise: TestFailure. [self assert: a identical: b] on: TestFailure do: [:e | |error| error := e messageText. + self assert: (error includesSubstring: a) description: 'Error message doesn''t include the expected value'. + self assert: (error includesSubstring: b) description: 'Error message doesn''t include the expected value'].! - self assert: (error includesSubString: a) description: 'Error message doesn''t include the expected value'. - self assert: (error includesSubString: b) description: 'Error message doesn''t include the expected value'].! Item was changed: ----- Method: SUnitTest>>testAssertIdenticalDescription (in category 'testing') ----- testAssertIdenticalDescription | a b | a := 'foo'. b := a copy. self should: [self assert: a identical: b description: 'A desciption'] raise: TestFailure. [self assert: a identical: b description: 'A desciption'] on: TestFailure do: [:e | |error| error := e messageText. + self assert: (error includesSubstring: 'A desciption') description: 'Error message doesn''t give you the description'].! - self assert: (error includesSubString: 'A desciption') description: 'Error message doesn''t give you the description'].! Item was changed: ----- Method: SUnitTest>>testAssertIdenticalWithEqualObjects (in category 'testing') ----- testAssertIdenticalWithEqualObjects | a b | a := 'foo'. b := a copy. self should: [self assert: a identical: b] raise: TestFailure. [self assert: a identical: b] on: TestFailure do: [:e | |error| error := e messageText. + self assert: (error includesSubstring: 'not identical') description: 'Error message doesn''t say the two things aren''t identical'].! - self assert: (error includesSubString: 'not identical') description: 'Error message doesn''t say the two things aren''t identical'].! Item was changed: ----- Method: SUnitTest>>testWithExceptionDo (in category 'testing') ----- testWithExceptionDo self should: [self error: 'foo'] raise: TestResult error withExceptionDo: [:exception | + self assert: (exception description includesSubstring: 'foo') - self assert: (exception description includesSubString: 'foo') ] ! Item was changed: ----- Method: TestCase>>executeShould:inScopeOf:withDescriptionContaining: (in category 'private') ----- executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionContaining: aString ^[aBlock value. false] on: anExceptionalEvent + do: [:ex | ex return: (ex description includesSubstring: aString) ] - do: [:ex | ex return: (ex description includesSubString: aString) ] ! Item was changed: ----- Method: TestCase>>executeShould:inScopeOf:withDescriptionNotContaining: (in category 'private') ----- executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionNotContaining: aString ^[aBlock value. false] on: anExceptionalEvent + do: [:ex | ex return: (ex description includesSubstring: aString) not ] - do: [:ex | ex return: (ex description includesSubString: aString) not ] ! |
Free forum by Nabble | Edit this page |