[squeak-dev] The Trunk: SUnit-ul.112.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 28 19:56:41 UTC 2018


Levente Uzonyi uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-ul.112.mcz

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

Name: SUnit-ul.112
Author: ul
Time: 28 May 2018, 9:56:22.231424 pm
UUID: 8ece3c29-1858-4d1b-9869-12f882db4a3b
Ancestors: SUnit-tpr.111

ClassFactoryForTestCase generates class names ending with random character sequences to significantly decrease the chance of name collisions among the generated classes.

See this thread for further explanation: http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-May/198941.html

=============== Diff against SUnit-tpr.111 ===============

Item was changed:
  ----- Method: ClassFactoryForTestCase>>newName (in category 'creating') -----
  newName
+ 
+ 	^String new: 23 + 22 streamContents: [ :stream |
+ 		| random |
+ 		stream nextPutAll: 'ClassForTestToBeDeleted'.
+ 		random := ThreadSafeRandom value.
+ 		"62 possible values, 5.95 bits / iteration, 22 iterations => more than 128 bits"
+ 		22 timesRepeat: [
+ 			stream nextPut: ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' atRandom: random) ] ]!
- 	| postFix |
- 	postFix := (self createdClasses size + 1) printString.
- 	^#ClassForTestToBeDeleted, postFix!



More information about the Squeak-dev mailing list