Christoph Thiede uploaded a new version of GraphicsTests to project The Trunk: http://source.squeak.org/trunk/GraphicsTests-ct.63.mcz
==================== Summary ====================
Name: GraphicsTests-ct.63 Author: ct Time: 1 June 2023, 9:07:23.607127 pm UUID: 2e7945d7-a0ba-f04a-8f49-1c19ed81fd4c Ancestors: GraphicsTests-nice.62
Complements Graphics-ct.541 (merges Color-fromString-css-function-1.cs).
=============== Diff against GraphicsTests-nice.62 ===============
Item was changed: ----- Method: ColorTest>>testFromString (in category 'tests') ----- testFromString self assert: ((Color fromString: '#FF8800') asHTMLColor sameAs: '#ff8800'); assert: ((Color fromString: 'FF8800') asHTMLColor sameAs: '#ff8800'); assert: ((Color fromString: '126,42,33') asHTMLColor sameAs: '#7E2A21'); assert: ((Color fromString: '00000000') asHTMLColor sameAs: '#00000000'); "html with alpha channel" assert: ((Color fromString: '#8C500BAE') asHTMLColor sameAs: '#8C500BAE'); assert: ((Color fromString: 'white') asHTMLColor sameAs: '#ffffff'); assert: ((Color fromString: 'black') asHTMLColor sameAs: '#000000'); assert: ((Color fromString: nil) asHTMLColor sameAs: '#ffffff'); assert: ((Color fromString: 'inexistent color') asHTMLColor sameAs: '#ffffff'); "should return white" assert: ((Color fromString: 'XXXXXX') asHTMLColor sameAs: '#ffffff') description: 'Color string should be alphanumeric'; assert: ((Color fromString: '000000000') asHTMLColor sameAs: '#ffffff') description: 'number string too long'. self assert: (Color fromString: 'DARKGRAY') = Color darkGray description: 'Color can be specified with a case insensitive color name'; + assert: (Color fromString: '#blue') = Color blue description: 'Color can be specified with a leading literal sharp'. + + self + assert: (Color fromString: 'rgb(12,34,56)') = (Color r: 12 g: 34 b: 56 range: 255); + assert: (Color fromString: 'rgba(12,34,56,0.78)') = ((Color r: 12 g: 34 b: 56 range: 255) alpha: 0.78).! - assert: (Color fromString: '#blue') = Color blue description: 'Color can be specified with a leading literal sharp'.!
packages@lists.squeakfoundation.org