Community
Participate
Working Groups
Test_org_eclipse_swt_widgets_Control#test_setForegroundLorg_eclipse_swt_graphics_Color Test_org_eclipse_swt_widgets_Text#test_getTopIndex are failing if I run the SWT tests on an unmodified Ubuntu 15.10 with org.eclipse.swt.internal.gtk.version=3.16.7
I'm running AllTests.java from org.eclipse.swt.tests
Yes, this is a GTK3.16 issue and is fixed on GTK3.18+. It's been fixed in bug 481122. I am also working on bug 483097 which will move SWT foreground colors to CSS for GTK3.16+. This will eliminate any further errors due to the deprecated GTK call gtk_widget_override_color().
(In reply to Eric Williams from comment #2) > Yes, this is a GTK3.16 issue and is fixed on GTK3.18+. It's been fixed in > bug 481122. Sorry, but I do not understand this. It has been fixed? Why do I still gets this error?
(In reply to Lars Vogel from comment #3) > Sorry, but I do not understand this. It has been fixed? Why do I still gets > this error? This bug is a native GTK bug. With GTK3.16 some of the GtkStyleContext internal machinery was changed, often breaking things. This applies for most "manual" theme functions like gtk_widget_override_*_color(), which we use in SWT to set backgrounds and foregrounds. The GTK team is pushing hard for developers to use CSS styled theming for everything, and is deprecating the "old style" theme functions. While deprecation usually means these functions will work until GTK4, this hasn't been the case. Because of it we have seen lots of test failures for GTK3.16 and GTK3.18 (at one point we had 24 failing test cases). Many of these have been fixed in SWT, but some (like the test failure you are seeing here) was fixed on the GTK side in GTK3.18. This is why in GTK3.16 you will see some lingering test failures for things like set/get Foreground/Background. All that being said, running these tests on GTK3.16 I see that the test failure starts happening after the fix to bug 478962. But again, this only happens on GTk3.16. I don't see any foreground/background test failures on GTK3.18.
Test_org_eclipse_swt_widgets_Text.test_getTopIndex is the last test that is consistently failing in the official build on CentOS (GTK 3.14.13): http://download.eclipse.org/eclipse/downloads/drops4/N20160420-2000/testresults/html/org.eclipse.swt.tests_ep46N-unit-cen64_linux.gtk.x86_64_8.0.html java.lang.AssertionError: expected:<1> but was:<0> at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_getTopIndex(Test_org_eclipse_swt_widgets_Text.java:866) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:743) ...
(In reply to Markus Keller from comment #5) > Test_org_eclipse_swt_widgets_Text.test_getTopIndex is the last test that is > consistently failing in the official build on CentOS (GTK 3.14.13): > > http://download.eclipse.org/eclipse/downloads/drops4/N20160420-2000/ > testresults/html/org.eclipse.swt.tests_ep46N-unit-cen64_linux.gtk.x86_64_8.0. > html > > java.lang.AssertionError: expected:<1> but was:<0> > at > org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text. > test_getTopIndex(Test_org_eclipse_swt_widgets_Text.java:866) > at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:743) > ... I have an open bug for this and hopefully the fix will land in master later this afternoon. *** This bug has been marked as a duplicate of bug 487467 ***