The Trunk: GraphicsTests-nice.53.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: GraphicsTests-nice.53.mcz

commits-2
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'.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: GraphicsTests-nice.53.mcz

marcel.taeumel
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

Am 16.05.2019 20:16:45 schrieb [hidden email] <[hidden email]>:

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'.!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: GraphicsTests-nice.53.mcz

Nicolas Cellier
Hi Marcel,
No, it's printHtmlString which is broken.

Le ven. 17 mai 2019 à 09:12, Marcel Taeumel <[hidden email]> a écrit :
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

Am 16.05.2019 20:16:45 schrieb [hidden email] <[hidden email]>:

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'.!