Nicolas Cellier uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-nice.53.mcz ==================== Summary ==================== Name: GraphicsTests-nice.53 Author: nice Time: 16 May 2019, 8:15:16.075297 pm UUID: 3f05f59a-6940-4d79-ad13-3724ac086821 Ancestors: GraphicsTests-nice.52 Add tests for round trip conversion of Color fromString: printHtmlString. =============== Diff against GraphicsTests-nice.52 =============== Item was changed: ----- Method: ColorTest>>testPrintHtmlString (in category 'tests') ----- testPrintHtmlString "self debug: #testPrintHtmlString" + "test the semantic of components" self assert: Color white printHtmlString = 'FFFFFF'. self assert: Color red printHtmlString = 'FF0000'. + self assert: Color green printHtmlString = '00FF00'. + self assert: Color blue printHtmlString = '0000FF'. + self assert: Color black printHtmlString = '000000'. + + "test all possible values for each component (but no combinatorial)" + 16r00 to: 16rFF do: + [:component | + | xx o roo ogo oob | + xx := component printStringBase: 16 length: 2 padded: true. + o := '00'. + roo := xx , o , o. + ogo := o , xx , o. + oob := o , o , xx. + self assert: roo equals: (Color fromString: '#' , roo) printHtmlString. + self assert: ogo equals: (Color fromString: '#' , ogo) printHtmlString. + self assert: oob equals: (Color fromString: '#' , oob) printHtmlString].! - self assert: Color black printHtmlString = '000000'.! |
Hi Nicolas, note than if you plan to fix (or change) the implementation of Color class >> #fromString:, we have to update *all* user-interface themes. :-( Best, Marcel
|
Hi Marcel, No, it's printHtmlString which is broken. Le ven. 17 mai 2019 à 09:12, Marcel Taeumel <[hidden email]> a écrit :
|
Free forum by Nabble | Edit this page |