Patrick Rein uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-pre.87.mcz ==================== Summary ==================== Name: ToolsTests-pre.87 Author: pre Time: 1 December 2018, 5:23:30.302597 pm UUID: 6799f95b-3e35-6246-9529-e67e1f2cd433 Ancestors: ToolsTests-pre.86 Refactors the FileContentsBrowserTest to not copy the browser creation and adds a test case for browsing change sets which does not yet show the problematic behavior. =============== Diff against ToolsTests-pre.86 =============== Item was changed: + ----- Method: FileContentsBrowserTest>>expectedFailures (in category 'failures') ----- - ----- Method: FileContentsBrowserTest>>expectedFailures (in category 'as yet unclassified') ----- expectedFailures ^ #(testChangeMessageCategoriesLeavesClassSelected) "See Mantis #7615"! Item was changed: + ----- Method: FileContentsBrowserTest>>setUp (in category 'running') ----- - ----- Method: FileContentsBrowserTest>>setUp (in category 'as yet unclassified') ----- setUp + | fileout testCat | - | fileout testCat package packageDict organizer | testCat := self class category. fileout := WriteStream on: (String new: 10000). SystemOrganization fileOutCategory: testCat on: fileout. + browser := FileContentsBrowser createBrowserForStream: fileout readStream named: testCat.! - - packageDict := Dictionary new. - browser := FileContentsBrowser new. - organizer := SystemOrganizer defaultList: Array new. - package := (FilePackage new fullName: testCat; fileInFrom: fileout readStream). - packageDict - at: package packageName - put: package. - organizer - classifyAll: package classes keys - under: package packageName. - (browser := FileContentsBrowser systemOrganizer: organizer) - packages: packageDict.! Item was added: + ----- Method: FileContentsBrowserTest>>testBrowsingAChangesetShowsMethods (in category 'tests') ----- + testBrowsingAChangesetShowsMethods + + | newChangeSet fileContents internalStream | + newChangeSet := ChangeSet basicNewNamed: 'fooTestSet' , (Random new nextLargeInt: 10000) asString. + self class compileSilently: 'theTestMethod ^ false'. + newChangeSet adoptSelector: #theTestMethod forClass: self class. + + internalStream := WriteStream on: (String new: 10000). + newChangeSet fileOutOn: internalStream. + fileContents := internalStream contents. + 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') ----- - ----- Method: FileContentsBrowserTest>>testChangeMessageCategoriesLeavesClassSelected (in category 'as yet unclassified') ----- testChangeMessageCategoriesLeavesClassSelected browser selectSystemCategory: browser systemCategoryList first. browser selectClassNamed: browser classList first. "This is a no-op." browser changeMessageCategories: browser classOrMetaClassOrganizer printString. self assert: browser selectedClassName = browser class name.! |
Free forum by Nabble | Edit this page |