tests/FormTests.st
branchjv
changeset 7721 97e40cfd96bb
parent 7315 aed1314a2448
child 7774 af9b89907c6e
--- a/tests/FormTests.st	Sat Nov 26 21:28:21 2016 +0000
+++ b/tests/FormTests.st	Sat Nov 26 20:51:38 2016 +0000
@@ -12,6 +12,9 @@
 !FormTests methodsFor:'running'!
 
 setUp
+    Display isNil ifTrue:[
+        Smalltalk openDisplay
+    ].
     self skipIf: Display isNil description: 'Display connection not available'
 
     "Created: / 25-04-2016 / 20:30:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -19,6 +22,25 @@
 
 !FormTests methodsFor:'tests - regression'!
 
+test_issue_25a
+    "
+    https://swing.fit.cvut.cz/projects/stx-jv/ticket/25
+    "
+    | form font |
+
+    self skipIf: ConfigurableFeatures hasXFT not description: 'XFT support not compiled in'.
+    form := Form width:32 height:32 depth:24.
+    form paint: Color black on: Color white.
+    form clear.
+    self assert: (form bits allSatisfy:[:byte | byte == 255 ]).
+    font := XftFontDescription for: SimpleView defaultFont.
+    form font: font.
+    form displayString: 'X' x: 16 y: 16.
+    self assert: (form bits anySatisfy:[:byte | byte ~~ 255 ]).
+
+    "Created: / 26-11-2016 / 00:23:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_issue_82
     "
     https://swing.fit.cvut.cz/projects/stx-jv/ticket/82