From d0803ef1d0cba0e2f412622a6b2d53fe965f4888 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Tue, 24 Jun 2014 21:39:07 -0300 Subject: [PATCH] opengl32/tests: Test glGetString() without an active GL context. --- dlls/opengl32/tests/opengl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 7384cb41312..e5e1507bd3c 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -715,6 +715,9 @@ static DWORD WINAPI wgl_thread(void *param) struct wgl_thread_param *p = param; HDC hdc = GetDC( p->hwnd ); + ok(!glGetString(GL_RENDERER) && !glGetString(GL_VERSION) && !glGetString(GL_VENDOR), + "Expected NULL string when no active context is set\n"); + SetLastError(0xdeadbeef); p->make_current = wglMakeCurrent(hdc, p->hglrc); p->make_current_error = GetLastError(); @@ -1668,6 +1671,8 @@ START_TEST(opengl) test_message_window(); test_dc(hwnd, hdc); + ok(!glGetString(GL_RENDERER) && !glGetString(GL_VERSION) && !glGetString(GL_VENDOR), + "Expected NULL string when no active context is set\n"); hglrc = wglCreateContext(hdc); res = wglMakeCurrent(hdc, hglrc); ok(res, "wglMakeCurrent failed!\n");