[squeak-dev] The Trunk: CollectionsTests-ar.92.mcz

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

[squeak-dev] The Trunk: CollectionsTests-ar.92.mcz

commits-2
Andreas Raab uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ar.92.mcz

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

Name: CollectionsTests-ar.92
Author: ar
Time: 1 September 2009, 12:48:39 pm
UUID: 1fd2d9a7-d875-4d44-9f11-7fae6489c982
Ancestors: CollectionsTests-ar.91

Tests covering the changes in RWBinaryOrTextStream and Character.

=============== Diff against CollectionsTests-ar.91 ===============

Item was added:
+ TestCase subclass: #RWBinaryOrTextStreamTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'CollectionsTests-Streams'!

Item was added:
+ ----- Method: RWBinaryOrTextStreamTest>>testUpToEnd (in category 'tests') -----
+ testUpToEnd
+
+ | stream |
+ stream := RWBinaryOrTextStream on: String new.
+ stream nextPutAll: 'world'; reset.
+ self assert: stream upToEnd = 'world'.
+ self assert: stream atEnd.
+
+ self assert: stream upToEnd = ''.
+ self assert: stream atEnd.
+
+ stream reset.
+ stream upTo: $r.
+ self assert: stream upToEnd = 'ld'.
+ self assert: stream atEnd.
+
+ stream := RWBinaryOrTextStream on: String new.
+ stream binary.
+ stream nextPutAll: 'world'; reset.
+ self assert: stream upToEnd = 'world' asByteArray.
+ self assert: stream atEnd.
+
+ self assert: stream upToEnd = ByteArray new.
+ self assert: stream atEnd.
+
+ stream reset.
+ stream upTo: $r asciiValue.
+ self assert: stream upToEnd = 'ld' asByteArray.
+ self assert: stream atEnd!

Item was added:
+ ----- Method: RWBinaryOrTextStreamTest>>testNextPutAll (in category 'tests') -----
+ testNextPutAll
+
+ | stream |
+ stream := RWBinaryOrTextStream on: String new.
+ stream nextPutAll: 'hello'.
+ self assert: stream contents = 'hello'.
+
+ stream := RWBinaryOrTextStream on: String new.
+ stream nextPutAll: 'hello' asArray.
+ self assert: stream contents = 'hello'.
+
+ stream := RWBinaryOrTextStream on: String new.
+ stream nextPutAll: 'hello' asByteArray.
+ self assert: stream contents = 'hello'
+ !

Item was added:
+ ----- Method: RWBinaryOrTextStreamTest>>testUpTo (in category 'tests') -----
+ testUpTo
+
+ | stream |
+ stream := RWBinaryOrTextStream on: String new.
+ stream nextPutAll: 'world'; reset.
+ self assert: (stream upTo: $r) = 'wo'.
+ self assert: stream next = $l.
+
+ stream := RWBinaryOrTextStream on: String new.
+ stream nextPutAll: 'hello'; reset.
+ self assert: (stream upTo: $x) = 'hello'.
+ self assert: stream atEnd.
+
+ stream := RWBinaryOrTextStream on: String new.
+ stream binary.
+ stream nextPutAll: 'world'; reset.
+ self assert: (stream upTo: $r asciiValue) = 'wo' asByteArray.
+ self assert: stream next = $l asciiValue.
+
+ stream := RWBinaryOrTextStream on: String new.
+ stream binary.
+ stream nextPutAll: 'hello'; reset.
+ self assert: (stream upTo: $x asciiValue) = 'hello' asByteArray.
+ self assert: stream atEnd.
+ !

Item was added:
+ ----- Method: CharacterTest>>testCodePoint (in category 'tests - creation') -----
+ testCodePoint
+ self assert: (Character codePoint: $A asciiValue) = $A.
+ self shouldnt:[Character codePoint: 500] raise: Error.
+ self assert: (Character codePoint: 500) asciiValue = 500.!