[squeak-dev] The Inbox: ShoutTests-ct.35.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 22 15:38:54 UTC 2021


A new version of ShoutTests was added to project The Inbox:
http://source.squeak.org/inbox/ShoutTests-ct.35.mcz

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

Name: ShoutTests-ct.35
Author: ct
Time: 22 October 2021, 5:38:53.529039 pm
UUID: 72218591-201d-e447-8da4-e3c46cd09b0c
Ancestors: ShoutTests-mt.33

Provides regression tests for an issue with background styling in Shout that is fixed in ShoutCore-ct.86.

Reuploaded to replace Tests-ct.466 which added the tests to the wrong package. Also eliminated use of #while[Not]Nil[:] and fixed the link in the class comment.

=============== Diff against ShoutTests-mt.33 ===============

Item was added:
+ TestCase subclass: #SHStylerBackgroundTest
+ 	instanceVariableNames: 'styler text styledText'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'ShoutTests'!
+ 
+ !SHStylerBackgroundTest commentStamp: 'ct 10/22/2021 17:36' prior: 0!
+ Regression tests for background styling in Shout. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-October/216778.html.!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>makeStyler (in category 'support') -----
+ makeStyler
+ 
+ 	^ SHTextStylerST80 new!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>runDeferredUIMessages (in category 'support') -----
+ runDeferredUIMessages
+ 
+ 	self assert: Smalltalk isMorphic.
+ 	
+ 	[Project current lastDeferredUIMessage isNil]
+ 		whileFalse: [Project current world runStepMethods].!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>setUp (in category 'running') -----
+ setUp
+ 
+ 	super setUp.
+ 	
+ 	self runDeferredUIMessages.
+ 	styler := self makeStyler view: self.
+ 	text := 'foo ^2+3' asText.
+ 	styledText := nil.!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>stylerStyledInBackground: (in category 'mock view') -----
+ stylerStyledInBackground: aText
+ 
+ 	styledText := aText!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>testBackgroundStyling (in category 'tests') -----
+ testBackgroundStyling
+ 
+ 	styler styleInBackgroundProcess: text.
+ 	
+ 	self waitForDeferredUIMessages.
+ 	self runDeferredUIMessages.
+ 	
+ 	self assert: text equals: styledText.!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>testDiscardBackgroundStyling1 (in category 'tests') -----
+ testDiscardBackgroundStyling1
+ 
+ 	styler styleInBackgroundProcess: text.
+ 	
+ 	styler discardBackgroundStyling.
+ 	self runDeferredUIMessages.
+ 	
+ 	self assert: styledText isNil.!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>testDiscardBackgroundStyling2 (in category 'tests') -----
+ testDiscardBackgroundStyling2
+ 
+ 	styler styleInBackgroundProcess: text.
+ 	
+ 	self waitForDeferredUIMessages.
+ 	styler discardBackgroundStyling.
+ 	self runDeferredUIMessages.
+ 	
+ 	self assert: styledText isNil.!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>testDiscardBackgroundStyling3 (in category 'tests') -----
+ testDiscardBackgroundStyling3
+ 
+ 	styler styleInBackgroundProcess: text.
+ 	
+ 	self waitForDeferredUIMessages.
+ 	self runDeferredUIMessages.
+ 	styler discardBackgroundStyling.
+ 	
+ 	self assert: text equals: styledText.!

Item was added:
+ ----- Method: SHStylerBackgroundTest>>waitForDeferredUIMessages (in category 'support') -----
+ waitForDeferredUIMessages
+ 
+ 	[Project current lastDeferredUIMessage isNil]
+ 		whileTrue: [10 milliSeconds wait].!



More information about the Squeak-dev mailing list