[squeak-dev] The Trunk: ToolsTests-ul.75.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 10 21:54:42 UTC 2016


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

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

Name: ToolsTests-ul.75
Author: ul
Time: 10 January 2016, 10:54:30.964862 pm
UUID: e23e5db2-a7bc-420b-95d9-0705c0108b15
Ancestors: ToolsTests-ul.74

Updated and simplified BrowserTest's #testFlattenHierarchyTreeOnIndent and #testFlattenHierarchyTreeOnIndentBy.

=============== Diff against ToolsTests-ul.74 ===============

Item was changed:
  ----- Method: BrowserTest>>testFlattenHierarchyTreeOnIndent (in category 'as yet unclassified') -----
  testFlattenHierarchyTreeOnIndent
  	| flatten |
+ 	flatten := [:coll | (browser
- 	flatten := [:coll | browser
  		flattenHierarchyTree: (browser createHierarchyTreeOf: coll)
  		on: OrderedCollection new
+ 		indent: '') asArray ].
- 		indent: ''].
  	"Empty collection."
  	self assert: (flatten value: #()) isEmpty.
  	"Single class."
+ 	self assert: #('Browser') equals: (flatten value: {Browser}).
- 	self assert: (OrderedCollection with: 'Browser') = (flatten value: {Browser}).
  	"Single class + subclass."
+ 	self assert: #('Browser' '  HierarchyBrowser') equals: (flatten value: {Browser. HierarchyBrowser}).
- 	self assert: (OrderedCollection with: 'Browser' with: ' HierarchyBrowser') = (flatten value: {Browser. HierarchyBrowser}).
  	"Single class + 2 subclasses"
+ 	self assert: #('Browser' '  HierarchyBrowser' '  FileContentsBrowser') equals: (flatten value: { Browser. HierarchyBrowser. FileContentsBrowser. }).
- 	self assert: (OrderedCollection with: 'Browser' with: ' HierarchyBrowser' with: ' FileContentsBrowser') = (flatten value: { Browser. HierarchyBrowser. FileContentsBrowser. }).
  	"Superclass, class, subclass"
+ 	self assert: #('CodeHolder' '  Browser' '    HierarchyBrowser') equals: (flatten value: { CodeHolder. Browser. HierarchyBrowser. }).
- 	self assert: (OrderedCollection with: 'CodeHolder' with: ' Browser' with: '  HierarchyBrowser') = (flatten value: { CodeHolder. Browser. HierarchyBrowser. }).
  	"Two 'unrelated' classes"
+ 	self assert: #('Browser' 'SmallInteger') equals: (flatten value: { Browser. SmallInteger }).
- 	self assert: (OrderedCollection with: 'Browser' with: 'SmallInteger') = (flatten value: { Browser. SmallInteger }).
  	"Two 'unrelated' classes and a common ancestor"
+ 	self assert: #('Browser' 'SmallInteger' 'ProtoObject') equals: (flatten value: { Browser. SmallInteger. ProtoObject }).!
- 	self assert: (OrderedCollection with: 'Browser' with: 'SmallInteger' with: 'ProtoObject') = (flatten value: { Browser. SmallInteger. ProtoObject }).!

Item was changed:
  ----- Method: BrowserTest>>testFlattenHierarchyTreeOnIndentBy (in category 'as yet unclassified') -----
  testFlattenHierarchyTreeOnIndentBy
  	| flatten |
+ 	flatten := [:coll | (browser
- 	flatten := [:coll | browser
  		flattenHierarchyTree: (browser createHierarchyTreeOf: coll)
  		on: OrderedCollection new
+ 		indent: ''
+ 		by: 'x') asArray ].
- 		indent: '' by: 'x'].
  	"Empty collection."
  	self assert: (flatten value: #()) isEmpty.
  	"Single class."
+ 	self assert: #('Browser') equals: (flatten value: {Browser}).
- 	self assert: (OrderedCollection with: 'Browser') = (flatten value: {Browser}).
  	"Single class + subclass."
+ 	self assert: #('Browser' 'xHierarchyBrowser') equals: (flatten value: {Browser. HierarchyBrowser}).
- 	self assert: (OrderedCollection with: 'Browser' with: 'xHierarchyBrowser') = (flatten value: {Browser. HierarchyBrowser}).
  	"Single class + 2 subclasses"
+ 	self assert: #('Browser' 'xHierarchyBrowser' 'xFileContentsBrowser') equals: (flatten value: { Browser. HierarchyBrowser. FileContentsBrowser. }).
- 	self assert: (OrderedCollection with: 'Browser' with: 'xHierarchyBrowser' with: 'xFileContentsBrowser') = (flatten value: { Browser. HierarchyBrowser. FileContentsBrowser. }).
  	"Superclass, class, subclass"
+ 	self assert: #('CodeHolder' 'xBrowser' 'xxHierarchyBrowser') equals: (flatten value: { CodeHolder. Browser. HierarchyBrowser. }).
- 	self assert: (OrderedCollection with: 'CodeHolder' with: 'xBrowser' with: 'xxHierarchyBrowser') = (flatten value: { CodeHolder. Browser. HierarchyBrowser. }).
  	"Two 'unrelated' classes"
+ 	self assert: #('Browser' 'SmallInteger') equals: (flatten value: { Browser. SmallInteger }).
- 	self assert: (OrderedCollection with: 'Browser' with: 'SmallInteger') = (flatten value: { Browser. SmallInteger }).
  	"Two 'unrelated' classes and a common ancestor"
+ 	self assert: #('Browser' 'SmallInteger' 'ProtoObject') equals: (flatten value: { Browser. SmallInteger. ProtoObject }).!
- 	self assert: (OrderedCollection with: 'Browser' with: 'SmallInteger' with: 'ProtoObject') = (flatten value: { Browser. SmallInteger. ProtoObject }).!



More information about the Squeak-dev mailing list