[squeak-dev] The Trunk: CollectionsTests-ar.93.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.93.mcz

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

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

Name: CollectionsTests-ar.93
Author: ar
Time: 1 September 2009, 12:58:10 pm
UUID: adc1c915-26d6-644c-bf9b-482bf46a9418
Ancestors: CollectionsTests-jcg.92, CollectionsTests-ar.92

Fix concurrent commit with Josh.

=============== Diff against CollectionsTests-jcg.92 ===============

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.!