The Trunk: CollectionsTests-dtl.117.mcz

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

The Trunk: CollectionsTests-dtl.117.mcz

commits-2
David T. Lewis uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-dtl.117.mcz

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

Name: CollectionsTests-dtl.117
Author: dtl
Time: 21 November 2009, 4:16:26 am
UUID: f3a2a6bd-8fa9-4016-939f-66b9a9dbabf1
Ancestors: CollectionsTests-ar.116

Add tests to document current behavior of String>>beginsWith: and String>>endsWith:

Other dialects (VW) may treat these differently for empty strings, e.g.:

'abc' beginsWith: ''
'abc' endsWith: ''

=============== Diff against CollectionsTests-ar.116 ===============

Item was added:
+ ----- Method: StringTest>>testEndsWith (in category 'tests - finding') -----
+ testEndsWith
+
+ self assert: ('Elvis' endsWith: 'vis').
+ self assert: ('Elvis' endsWith: 'Elvis').
+ self assert: ('Elvis' endsWith: 's').
+ self deny: ('Elvis' endsWith: 'S').
+ self deny: ('Elvis' endsWith: ' Elvis').
+ self deny: ('' endsWith: '').
+ self deny: ('abc' endsWith: '')!

Item was added:
+ ----- Method: StringTest>>testBeginsWith (in category 'tests - finding') -----
+ testBeginsWith
+
+ self assert: ('Elvis' beginsWith: 'Elv').
+ self assert: ('Elvis' beginsWith: 'Elvis').
+ self assert: ('Elvis' beginsWith: 'E').
+ self deny: ('Elvis' beginsWith: 'e').
+ self deny: ('Elvis' beginsWith: 'Elvis ').
+ self deny: ('' beginsWith: '').
+ self deny: ('abc' beginsWith: '')!