The Trunk: NetworkTests-topa.51.mcz

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

The Trunk: NetworkTests-topa.51.mcz

commits-2
Tobias Pape uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-topa.51.mcz

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

Name: NetworkTests-topa.51
Author: topa
Time: 14 October 2017, 2:02:48.846375 pm
UUID: e76a984c-5a36-443b-9d19-32a2d98ec4ba
Ancestors: NetworkTests-pre.50

Support binary streams in MockSocketStream

=============== Diff against NetworkTests-pre.50 ===============

Item was changed:
  Stream subclass: #MockSocketStream
+ instanceVariableNames: 'binary atEnd inStream outStream'
- instanceVariableNames: 'atEnd inStream outStream'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'NetworkTests-Kernel'!

Item was added:
+ ----- Method: MockSocketStream>>ascii (in category 'configuration') -----
+ ascii
+
+ binary := false.
+ self refreshStreams.!

Item was added:
+ ----- Method: MockSocketStream>>binary (in category 'configuration') -----
+ binary
+
+ binary := true.
+ self refreshStreams.!

Item was changed:
  ----- Method: MockSocketStream>>initialize (in category 'initialize-release') -----
  initialize
+ binary := false.
  self resetInStream.
  self resetOutStream.!

Item was added:
+ ----- Method: MockSocketStream>>refreshStreams (in category 'initialize-release') -----
+ refreshStreams
+
+ binary = self inStream isBinary ifFalse: [self resetInStream].
+ binary = self outStream isBinary ifFalse: [self resetOutStream].
+ !

Item was changed:
  ----- Method: MockSocketStream>>resetInStream (in category 'stream in') -----
  resetInStream
+ inStream := self streamSpecies new writeStream.!
- inStream := WriteStream on: ''.!

Item was changed:
  ----- Method: MockSocketStream>>resetOutStream (in category 'stream out') -----
  resetOutStream
+ outStream := self streamSpecies new writeStream.!
- outStream := WriteStream on: ''.!

Item was added:
+ ----- Method: MockSocketStream>>streamSpecies (in category 'initialize-release') -----
+ streamSpecies
+
+ ^ binary ifTrue: [ByteArray] ifFalse: [ByteString].
+ !