[squeak-dev] The Trunk: CollectionsTests-ct.377.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 4 19:08:48 UTC 2022


Christoph Thiede uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ct.377.mcz

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

Name: CollectionsTests-ct.377
Author: ct
Time: 4 May 2022, 9:08:44.68825 pm
UUID: 85c06a91-fa23-b047-8dc0-27937cb65cc0
Ancestors: CollectionsTests-mt.376, CollectionsTests-ct.360

Merges CollectionsTests-ct.360 (Complements Collections-ct.949).

=============== Diff against CollectionsTests-mt.376 ===============

Item was added:
+ ----- Method: HtmlReadWriterTest>>test17ImgTagDataUri (in category 'tests') -----
+ test17ImgTagDataUri
+ 
+ 	| form |
+ 	form := Form dotOfSize: 16 color: Color maroon.
+ 	
+ 	{
+ 		'data:image/png;base64,{1}' format: {
+ 			(ByteArray streamContents: [:stream |
+ 				PNGReadWriter putForm: form onStream: stream]) base64Encoded}.
+ 		'data:image/jpeg;base64,{1}' format: {
+ 			(ByteArray streamContents: [:stream |
+ 				PNGReadWriter putForm: form onStream: stream]) base64Encoded}.
+ 	} do: [:uri | | expectedHtml expectedText |
+ 		expectedHtml := 'Hello <img src="{1}" alt="Red dot" /> World' format: {uri}.
+ 		expectedText := ('Hello {1} World' format: {Character startOfHeader}) asText
+ 			addAttribute: form asTextAnchor from: 7 to: 7;
+ 			addAttribute: (TextColor color: Color transparent) from: 7 to: 7.
+ 		
+ 		self convertHtml: expectedHtml.
+ 		self assert: expectedText string equals: text string.
+ 		expectedText runs with: text runs do: [:expectedAttributes :actualAttributes |
+ 			expectedAttributes with: actualAttributes do: [:expectedAttribute :actualAttribute |
+ 				self assert: (expectedAttribute = actualAttribute or: [
+ 					((expectedAttribute respondsTo: #anchoredMorph)
+ 						and: [actualAttribute respondsTo: #anchoredMorph])
+ 						and: [(expectedAttribute anchoredMorph "aForm" unhibernate; bits)
+ 							= (actualAttribute anchoredMorph "aForm" unhibernate; bits)]  ]) ]]].!



More information about the Squeak-dev mailing list