[squeak-dev] The Trunk: CollectionsTests-cmm.195.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 29 02:20:29 UTC 2013


Chris Muller uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-cmm.195.mcz

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

Name: CollectionsTests-cmm.195
Author: cmm
Time: 28 January 2013, 8:20:02.188 pm
UUID: 0f5298fb-9001-4d27-844b-3181e86da7ab
Ancestors: CollectionsTests-ul.194

Tests for FloatCollection.

=============== Diff against CollectionsTests-ul.194 ===============

Item was added:
+ ClassTestCase subclass: #FloatCollectionTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'CollectionsTests-Sequenceable'!

Item was added:
+ ----- Method: FloatCollectionTest>>testAdd (in category 'tests') -----
+ testAdd
+ 	| fc |
+ 	fc := #(1 2 3 4 ) as: FloatCollection.
+ 	fc add: 88.
+ 	self assert: fc asArray = #(1.0 2.0 3.0 4.0 88.0 ) asFloatArray.
+ 	fc add: 99.
+ 	self assert: fc = (#(1 2 3 4 88 99 ) as: FloatCollection)!

Item was added:
+ ----- Method: FloatCollectionTest>>testInternalArray (in category 'tests') -----
+ testInternalArray
+ 	| fc internalArray |
+ 	fc := FloatCollection new.
+ 	self
+ 		 deny: (internalArray := fc instVarNamed: 'array') class isPointers ;
+ 		 assert: fc isEmpty.
+ 	internalArray size + 1 timesRepeat: [ fc add: 0.0 ].
+ 	self
+ 		 assert: fc size = internalArray size + 1 ;
+ 		 assert: (fc instVarNamed: 'array') size = (internalArray size * 2)!



More information about the Squeak-dev mailing list