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

commits-2
Joshua Gargus uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-jcg.92.mcz

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

Name: CollectionsTests-jcg.92
Author: jcg
Time: 1 September 2009, 12:49:22 pm
UUID: ed08053a-039e-4407-9565-e3c8d84149f1
Ancestors: CollectionsTests-ar.91

Additional tests for Base64MimeConverterTest:
- test that it works on ByteArrays too
- test convenience method #base64Encoded
- test that mimeEncode: doesn't first reset input stream.

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

Item was added:
+ ----- Method: Base64MimeConverterTest>>testOnByteArray (in category 'tests') -----
+ testOnByteArray
+ self assert: ('Hi There!!' base64Encoded = 'Hi There!!' asByteArray base64Encoded)!

Item was changed:
  ----- Method: Base64MimeConverterTest>>setUp (in category 'initialize-release') -----
  setUp
+ message := 'Hi There!!' readStream.
+ !
- message := ReadWriteStream on: (String new: 10).
- message nextPutAll: 'Hi There!!'.!

Item was changed:
  ----- Method: Base64MimeConverterTest>>testMimeEncodeDecode (in category 'tests') -----
  testMimeEncodeDecode
 
  | encoded |
  encoded := Base64MimeConverter mimeEncode: message.
  self assert: (encoded contents = 'SGkgVGhlcmUh').
+      self assert: ((Base64MimeConverter mimeDecodeToChars: encoded) contents = message contents).
+
+ "Encoding should proceed from the current stream position."
+ message reset.
+ message skip: 2.
+ encoded := Base64MimeConverter mimeEncode: message.
+ self assert: (encoded contents = 'IFRoZXJlIQ==').!
-      self assert: ((Base64MimeConverter mimeDecodeToChars: encoded) contents = message contents).!

Item was added:
+ ----- Method: Base64MimeConverterTest>>testBase64Encoded (in category 'tests') -----
+ testBase64Encoded
+ | encoded |
+ encoded := (Base64MimeConverter mimeEncode: message) contents.
+ self assert: encoded = 'Hi There!!' base64Encoded.
+ !