| 193 | |
| 194 | |
| 195 | void checkWindowColor(Display *dpy, Window win, unsigned int color, |
| 196 | bool right = false) |
| 197 | { |
| 198 | int fakerColor; |
| 199 | typedef int (*_vgl_getAutotestColorType)(Display *, Window, int); |
| 200 | _vgl_getAutotestColorType _vgl_getAutotestColor; |
| 201 | |
| 202 | _vgl_getAutotestColor = |
| 203 | (_vgl_getAutotestColorType)dlsym(RTLD_DEFAULT, "_vgl_getAutotestColor"); |
| 204 | if(!_vgl_getAutotestColor) |
| 205 | THROWNL("Can't communicate w/ faker"); |
| 206 | fakerColor = _vgl_getAutotestColor(dpy, win, right); |
| 207 | if(fakerColor < 0 || fakerColor > 0xffffff) |
| 208 | THROWNL("Bogus data read back"); |
| 209 | if((unsigned int)fakerColor != color) |
| 210 | { |
| 211 | if(right) |
| 212 | PRERROR2("R.buf is 0x%.6x, should be 0x%.6x", fakerColor, color) |
| 213 | else |
| 214 | PRERROR2("Color is 0x%.6x, should be 0x%.6x", fakerColor, color) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | |
| 219 | void checkFrame(Display *dpy, Window win, int desiredReadbacks, int &lastFrame) |
no test coverage detected