[squeak-dev] The Trunk: CollectionsTests-mt.336.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 17 14:57:16 UTC 2020


Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-mt.336.mcz

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

Name: CollectionsTests-mt.336
Author: mt
Time: 17 April 2020, 4:57:13.61786 pm
UUID: d1149030-f619-dc47-a465-3e378aad6f30
Ancestors: CollectionsTests-nice.335

Complements Collections-mt.886

=============== Diff against CollectionsTests-nice.335 ===============

Item was added:
+ ----- Method: HtmlReadWriterTest>>test16ImgTag (in category 'tests') -----
+ test16ImgTag
+ 	<timeout: 10>
+ 
+ 	| imgUrl imgExpression formFromUrl formFromExpression |
+ 	imgUrl := 'https://squeak.org/img/downloads/image.png'.
+ 	imgExpression := 'Form dotOfSize: 12 at 12 color: Color green'.
+ 	
+ 	self ensureSecureInternetConnection.
+ 	
+ 	formFromUrl := (Smalltalk classNamed: 'WebClient') ifNotNil: [:client |
+ 		Form fromBinaryStream: (client httpGet: imgUrl) content asByteArray readStream].
+ 	formFromExpression := Compiler evaluate: imgExpression.
+ 	
+ 	{
+ 		'Hello <img src="{1}"> World' format: { imgUrl }.
+ 		('Hello {1} World' format: { Character startOfHeader }) asText
+ 			addAttribute: formFromUrl asTextAnchor from: 7 to: 7;
+ 			addAttribute: (TextColor color: Color transparent) from: 7 to: 7.
+ 
+ 		'Hello <img src="code://{1}"> World' format: { imgExpression }.
+ 		('Hello {1} World' format: { Character startOfHeader }) asText
+ 			addAttribute: formFromExpression asTextAnchor from: 7 to: 7;
+ 			addAttribute: (TextColor color: Color transparent) from: 7 to: 7.
+ 		
+ 	} pairsDo: [:expectedHtml :expectedText |
+ 		
+ 		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)]  ]) ]]].!

Item was changed:
+ ----- Method: HtmlReadWriterTest>>textWithDoIt (in category 'support') -----
- ----- Method: HtmlReadWriterTest>>textWithDoIt (in category 'tests') -----
  textWithDoIt
  	" Version of TextAction>>emphasizeScanner: with a Doit on the third line "
  	| doit |
  	doit := TextDoIt basicNew instVarAt: 1 put: 'Purple ifNil: [Purple := self userInterfaceTheme color ifNil: [Color r: 0.4 g: 0.0 b: 1]].'; yourself.
  	^ (Text string: 'emphasizeScanner: scanner
  "Set the emphasis for text display"
  Purple ifNil: [Purple := self userInterfaceTheme color ifNil: [Color r: 0.4 g: 0.0 b: 1]].
  scanner textColor: Purple.' runs: (RunArray runs: #(17 1 7 1 35 1 6 1 6 1 1 6 1 2 1 4 1 18 1 5 1 6 1 1 5 1 2 1 3 1 2 1 3 1 2 1 1 1 1 1 1 7 1 10 1 6 1 ) values: ((Array new: 47) at: 1 put: ((Array new: 1) at: 1 put: (TextEmphasis basicNew instVarAt: 1 put: 1; instVarAt: 2 put: true; yourself); yourself); at: 2 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 3 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); yourself); at: 4 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 5 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.5 b: 0.5); yourself); yourself); at: 6 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 7 put: ((Array new: 2) at: 1 put: (TextColor ba
 sicNew instVarAt: 1 put: (Color r: 0.25 g: 0.25 b: 0.25); yourself); at: 2 put: doit; yourself); at: 8 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 9 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 10 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 11 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 12 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.25 g: 0.25 b: 0.25); yourself); at: 2 put: doit; yourself); at: 13 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 14 put: ((Array new
 : 2) at: 1 put: (TextEmphasis basicNew instVarAt: 1 put: 1; instVarAt: 2 put: true; yourself); at: 2 put: doit; yourself); at: 15 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 16 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 17 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 18 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 19 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 20 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself)
 ; at: 21 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 22 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 23 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 24 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.5 b: 0.0); yourself); at: 2 put: doit; yourself); at: 25 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 26 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 27 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); a
 t: 2 put: doit; yourself); at: 28 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 29 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 30 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 31 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 32 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 33 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 34 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 
 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 35 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); at: 2 put: doit; yourself); at: 36 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 37 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.5 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 38 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.5 b: 0.0); yourself); at: 2 put: doit; yourself); at: 39 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 40 put: ((Array new: 2) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); at: 2 put: doit; yourself); at: 41 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt:
  1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 42 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); yourself); at: 43 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 44 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.5); yourself); yourself); at: 45 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); at: 46 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.25 g: 0.25 b: 0.25); yourself); yourself); at: 47 put: ((Array new: 1) at: 1 put: (TextColor basicNew instVarAt: 1 put: (Color r: 0.0 g: 0.0 b: 0.0); yourself); yourself); yourself)))!



More information about the Squeak-dev mailing list