Patrick Rein uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-pre.90.mcz==================== Summary ====================
Name: ToolsTests-pre.90
Author: pre
Time: 27 December 2018, 10:01:15.558503 pm
UUID: 580984a1-c023-c149-962f-0e6ca7836596
Ancestors: ToolsTests-pre.89
Changes the FileContentsBrowserTest to trigger a failure we observed recently when browsing a changeset whose classes are not present in the system. Also improves another test case and removes the expected failures after fixing the corresponding bug.
=============== Diff against ToolsTests-pre.89 ===============
Item was removed:
- ----- Method: FileContentsBrowserTest>>expectedFailures (in category 'failures') -----
- expectedFailures
- ^ #(testChangeMessageCategoriesLeavesClassSelected) "See Mantis #7615"!
Item was changed:
----- Method: FileContentsBrowserTest>>testBrowsingAChangesetShowsMethods (in category 'tests') -----
testBrowsingAChangesetShowsMethods
+ | newChangeSet fileContents internalStream class |
- | newChangeSet fileContents internalStream |
newChangeSet := ChangeSet basicNewNamed: 'fooTestSet' , (Random new nextLargeInt: 10000) asString.
+ SystemChangeNotifier uniqueInstance doSilently: [
+ class := Object subclass: #FileContentsBrowserTestTestObject
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: self class category name asString.
+ class compileSilently: 'theTestMethod ^ false'].
- self class compileSilently: 'theTestMethod ^ false'.
- newChangeSet adoptSelector: #theTestMethod forClass: self class.
+ newChangeSet adoptSelector: #theTestMethod forClass: class.
+
internalStream := WriteStream on: (String new: 10000).
newChangeSet fileOutOn: internalStream.
fileContents := internalStream contents.
+ class removeFromSystem.
- self class removeSelector: #theTestMethod.
browser := FileContentsBrowser createBrowserForStream: (MultiByteBinaryOrTextStream with: fileContents) named: 'testFoo'.
browser selectSystemCategory: browser systemCategoryList first.
browser selectClassNamed: browser classList first.
self assert: browser messageList size = 1.!
Item was changed:
----- Method: FileContentsBrowserTest>>testChangeMessageCategoriesLeavesClassSelected (in category 'tests') -----
testChangeMessageCategoriesLeavesClassSelected
browser selectSystemCategory: browser systemCategoryList first.
+ browser selectClassNamed: self class name.
- browser selectClassNamed: browser classList first.
"This is a no-op."
browser changeMessageCategories: browser classOrMetaClassOrganizer printString.
+ self assert: browser selectedClassName = self class name.!
- self assert: browser selectedClassName = browser class name.!