[squeak-dev] The Inbox: CollectionsTests-ct.360.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 29 22:40:46 UTC 2021


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

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

Name: CollectionsTests-ct.360
Author: ct
Time: 30 June 2021, 12:40:42.641133 am
UUID: dddcbdf8-39be-be4a-8769-cccd9db4ab2e
Ancestors: CollectionsTests-nice.354

Complements Collections-ct.949.

=============== Diff against CollectionsTests-nice.354 ===============

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