[squeak-dev] The Trunk: CollectionsTests-pre.267.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 16 14:48:07 UTC 2016


Patrick Rein uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-pre.267.mcz

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

Name: CollectionsTests-pre.267
Author: pre
Time: 16 August 2016, 4:47:57.075278 pm
UUID: db136bfa-dcdb-b946-8f00-205132249875
Ancestors: CollectionsTests-topa.266

Improves attribute scanning tests by using specific fonts and adds tests documenting issues with bold fonts.

=============== Diff against CollectionsTests-topa.266 ===============

Item was added:
+ ----- Method: TextAttributesScanningTest>>doTestTextFontReferenceSerializationFor: (in category 'testing') -----
+ doTestTextFontReferenceSerializationFor: font
+ 
+ 	| att att3 fontReferenceString stream |
+ 	att := TextFontReference toFont: font.
+ 	stream := self streamWithAttribute: att.
+ 	fontReferenceString := self testScanAttribute: att fromStream: stream encodedWithCharacter: $F decodedWithBlock: [:strm | strm upToEnd].
+ 	self assert: font familyName, '#', font height equals: fontReferenceString.
+ 	stream reset.
+ 	att3 := TextAttribute newFrom: stream.
+ 	self assert: att equals: att3.!

Item was added:
+ ----- Method: TextAttributesScanningTest>>doTestTextFontReferenceTTCFor: (in category 'testing') -----
+ doTestTextFontReferenceTTCFor: font
+ 
+ 	| att att3 fontReferenceString stream |
+ 	att := TextFontReference toFont: font.
+ 	stream := self streamWithAttribute: att.
+ 	fontReferenceString := self testScanAttribute: att fromStream: stream encodedWithCharacter: $F decodedWithBlock: [:strm | strm upToEnd].
+ 	self assert: font familyName, '#', font height equals: fontReferenceString.
+ 	stream reset.
+ 	att3 := TextAttribute newFrom: stream.
+ 	"test font height only, see comment above"
+ 	self assert: att font height equals: att3 font height.
+ 	"we really want an exact match, which probably requires different implentation of TextFontReference"
+ 	self assert: att equals: att3.
+ !

Item was changed:
  ----- Method: TextAttributesScanningTest>>expectedFailures (in category 'running') -----
  expectedFailures
  	"Tests for text attributes that are apparently unused, and that may be candidates
  	for removal from the image"
  	^#(
  		testTextAnchor
  		testTextIndent
  		testTextMessageLink
  		testTextPlusJumpStart
  		testTextPlusJumpEnd
+ 		
+ 		"Actually failing tests which document bugs to be fixed (pre)"
+ 		testTextFontReferenceForBoldFont
+ 		testTextFontReferenceTTCForBoldFont
  		)!

Item was changed:
  ----- Method: TextAttributesScanningTest>>testTextFontReference (in category 'testing') -----
  testTextFontReference
  	"Test TextFontReference with a StrikeFont"
+ 	| font |
+ 	font := TTCFont familyName: 'BitstreamVeraSans' pointSize: 9 emphasis: 0.
+ 	self doTestTextFontReferenceSerializationFor: font.
+ !
- 	| font att att3 stream fontReferenceString |
- 	font := StrikeFont someInstance.
- 	att := TextFontReference toFont: font.
- 	stream := self streamWithAttribute: att.
- 	fontReferenceString := self testScanAttribute: att fromStream: stream encodedWithCharacter: $F decodedWithBlock: [:strm | strm upToEnd].
- 	self assert: font familyName, '#', font height equals: fontReferenceString.
- 	stream reset.
- 	att3 := TextAttribute newFrom: stream.
- 	self assert: att equals: att3.!

Item was added:
+ ----- Method: TextAttributesScanningTest>>testTextFontReferenceForBoldFont (in category 'testing') -----
+ testTextFontReferenceForBoldFont
+ 	"Test TextFontReference with a StrikeFont"
+ 	| font |
+ 	font := TTCFont familyName: 'BitstreamVeraSans' pointSize: 9 emphasis: 1.
+ 	self doTestTextFontReferenceSerializationFor: font.
+ !

Item was changed:
  ----- Method: TextAttributesScanningTest>>testTextFontReferenceTTC (in category 'testing') -----
  testTextFontReferenceTTC
  	"n.b. A TextFontReference specifies font height only, which is not sufficient
  	to identify a unique TTCFont. Here we test only that the font height of the
  	selected font matches the TextFontReference specification."
  
  	"(self selector: #testTextFontReferenceTTC) debug"
  
  	"Test TextFontReference with a TTCFont"
+ 	| font |
+ 	font := TTCFont familyName: 'BitstreamVeraSans' pointSize: 9 emphasis: 0.
+ 	self doTestTextFontReferenceTTCFor: font.!
- 	| font att att3 stream fontReferenceString |
- 	font := TTCFont someInstance textStyle fonts first.
- 	att := TextFontReference toFont: font.
- 	stream := self streamWithAttribute: att.
- 	fontReferenceString := self testScanAttribute: att fromStream: stream encodedWithCharacter: $F decodedWithBlock: [:strm | strm upToEnd].
- 	self assert: font familyName, '#', font height equals: fontReferenceString.
- 	stream reset.
- 	att3 := TextAttribute newFrom: stream.
- 	"test font height only, see comment above"
- 	self assert: att font height equals: att3 font height.
- 	"we really want an exact match, which probably requires different implentation of TextFontReference"
- 	self assert: att equals: att3.
- !

Item was added:
+ ----- Method: TextAttributesScanningTest>>testTextFontReferenceTTCForBoldFont (in category 'testing') -----
+ testTextFontReferenceTTCForBoldFont
+ 	"n.b. A TextFontReference specifies font height only, which is not sufficient
+ 	to identify a unique TTCFont. Here we test only that the font height of the
+ 	selected font matches the TextFontReference specification."
+ 
+ 	"(self selector: #testTextFontReferenceTTC) debug"
+ 
+ 	"Test TextFontReference with a TTCFont"
+ 	| font |
+ 	font := TTCFont familyName: 'BitstreamVeraSans' pointSize: 9 emphasis: 1.
+ 	self doTestTextFontReferenceTTCFor: font.!



More information about the Squeak-dev mailing list