[squeak-dev] The Trunk: CollectionsTests-mt.233.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 19 08:16:58 UTC 2015


Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-mt.233.mcz

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

Name: CollectionsTests-mt.233
Author: mt
Time: 19 January 2015, 9:16:51.95 am
UUID: d2cf5a69-1834-3b44-9a45-91b26a7a33d7
Ancestors: CollectionsTests-ul.232

Tests updated for OrderedDictionary

=============== Diff against CollectionsTests-ul.232 ===============

Item was changed:
  ----- Method: OrderedDictionaryTest>>testCopy (in category 'tests - copying') -----
  testCopy
  
  	sut
  		at: 1 put: nil;
  		at: 2 put: nil;
+ 		at: 3 put: nil.
- 		at: 1 put: nil.
  
  	sut copy in: [:copy |
  		self assert: sut keys equals: copy keys.
+ 		copy at: 4 put: nil.
+ 		self assert: sut keys size < copy keys size].!
- 		copy at: 2 put: nil.
- 		self
- 			assert: sut keys size = copy keys size;
- 			assert: sut keys ~= copy keys].!

Item was changed:
  ----- Method: OrderedDictionaryTest>>testGrow (in category 'tests') -----
  testGrow
  
  	self
  		assert: 11 equals: sut capacity; "next prime number to 7; see #setUp"
+ 		assert: sut capacity > (sut instVarNamed: #order) size. "save memory"
- 		assert: sut capacity equals: (sut instVarNamed: #order) size.
  
  	1 to: sut capacity do: [:ea |
  		sut at: ea put: nil].
  
  	self
  		assert: sut capacity > 11;
+ 		assert: sut capacity > (sut instVarNamed: #order) size. "save memory"!
- 		assert: sut capacity equals: (sut instVarNamed: #order) size.!

Item was changed:
  ----- Method: OrderedDictionaryTest>>testOverflow (in category 'tests') -----
  testOverflow
  	"Check whether repeated additions of the same alternating keys causes an error."
  
  	self
+ 		shouldnt: [20 timesRepeat: [sut at: 1 put: nil; removeKey: 1]]
- 		shouldnt: [20 timesRepeat: [sut at: 1 put: nil. sut at: 2 put: nil]]
  		raise: Error. !

Item was changed:
  ----- Method: OrderedDictionaryTest>>testOverwriteValue (in category 'tests') -----
  testOverwriteValue
+ 	"First write wins wrt. order in the dictionary."
  
  	1 to: 5 do: [:ea |
  		sut at: ea put: nil].
  
  	sut at: 3 put: nil.
  
+ 	self assert: #(1 2 3 4 5) equals: sut keys.!
- 	self assert: #(1 2 4 5 3) equals: sut keys.!

Item was removed:
- ----- Method: OrderedDictionaryTest>>testSortAfterOverwrite (in category 'tests - sorting') -----
- testSortAfterOverwrite
- 
- 	10 to: 1 by: -1 do: [:ea |
- 		sut at: ea put: nil].
- 
- 	sut at: 5 put: nil.
- 	sut sort.
- 	self assert: (1 to: 10) asArray equals: sut keys.!



More information about the Squeak-dev mailing list