BTW, this test works for me. If you don't see a red and green window
flash, then Java is unable to push the test window to the front of the
stack. The test tries to ensure the sample window is visible and on
top by sampling a known pixel; in your case it's black, which might
mean it's obscured or that the robot is not capable of sampling the
display properly.
On Mar 26, 2009, at 5:26 PM, Alan Snyder wrote:
Hello,
I ran this test on OS-X (iMac) with the latest Java release from
Apple,
but get the following test failure:
-- start cut and paste --
java -classpath ../lib/jna.jar:../lib/examples.jar:../lib/
junit-4.5.jar:./ junit.textui.TestRunner
com.sun.jna.examples.WindowUtilsTest
.F.
Time: 5.914
There was 1 failure:
1)
testWindowRegion
(com
.sun
.jna.examples.WindowUtilsTest)junit.framework.AssertionFailedError:
Timed out waiting for shaped window to appear, expected foreground
color (sample=java.awt.Color[r=0,g=0,b=0] vs
expected=java.awt.Color[r=255,g=0,b=0])
at
com
.sun
.jna.examples.WindowUtilsTest.testWindowRegion(WindowUtilsTest.java:
324)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
FAILURES!!!
Tests run: 2, Failures: 1, Errors: 0