[PATCH 3/3] opengl32/tests: Test wglCopyContext().
Zhiyi Zhang
zzhang at codeweavers.com
Thu Apr 28 02:59:10 CDT 2022
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/opengl32/tests/opengl.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index 8b0e70ccf9c..f5ce9e6f983 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -1820,6 +1820,26 @@ static void test_wglChoosePixelFormatARB(HDC hdc)
}
}
+static void test_copy_context(HDC hdc)
+{
+ HGLRC ctx, ctx2;
+ BOOL ret;
+
+ ctx = wglCreateContext(hdc);
+ ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
+ ctx2 = wglCreateContext(hdc);
+ ok(!!ctx2, "Failed to create GL context, last error %#lx.\n", GetLastError());
+
+ ret = wglCopyContext(ctx, ctx2, GL_ALL_ATTRIB_BITS);
+ todo_wine
+ ok(ret, "Failed to copy GL context, last error %#lx.\n", GetLastError());
+
+ ret = wglDeleteContext(ctx2);
+ ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
+ ret = wglDeleteContext(ctx);
+ ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
+}
+
START_TEST(opengl)
{
HWND hwnd;
@@ -1905,6 +1925,7 @@ START_TEST(opengl)
test_getprocaddress(hdc);
test_deletecontext(hwnd, hdc);
test_makecurrent(hdc);
+ test_copy_context(hdc);
/* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */
if (!pwglGetExtensionsStringARB)
--
2.32.0
More information about the wine-devel
mailing list