Commit c4738880 by Zhenyao Mo

Revert "Make EGLQueryContextTest use ANGLE_INSTANTIATE_TEST"

Broke win build ninja: error: '../../gpu/egl_tests/EGLQueryContextTest.cpp', needed by 'obj/gpu/egl_tests/angle_end2end_tests.EGLQueryContextTest.obj', missing and no known rule to make it This reverts commit 887dd2f1. Change-Id: I2ceb430010628c2aa7cb242eb2bf49406d8d87db Reviewed-on: https://chromium-review.googlesource.com/270471Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Tested-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent 887dd2f1
......@@ -49,13 +49,14 @@
'<(angle_path)/src/tests/gl_tests/UnpackRowLength.cpp',
'<(angle_path)/src/tests/gl_tests/VertexAttributeTest.cpp',
'<(angle_path)/src/tests/gl_tests/ViewportTest.cpp',
'<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp',
'<(angle_path)/src/tests/test_utils/ANGLETest.cpp',
'<(angle_path)/src/tests/test_utils/ANGLETest.h',
'<(angle_path)/src/tests/test_utils/angle_test_configs.h',
],
'angle_end2end_tests_win_sources':
[
# TODO(cwallez) for Linux, requires only trying the OpenGL ANGLE platform
'<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp',
# TODO(cwallez) for Linux, requires a portable implementation of sleep
'<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp',
# TODO(cwallez) for Linux, requires implementation of eglBindTexImage for pbuffers
......
......@@ -9,23 +9,19 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "test_utils/angle_test_configs.h"
using namespace angle;
class EGLQueryContextTest : public testing::TestWithParam<PlatformParameters>
class EGLQueryContextTest : public testing::TestWithParam<int>
{
public:
void SetUp() override
{
int clientVersion = GetParam().mClientVersion;
int clientVersion = GetParam();
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));
EXPECT_TRUE(eglGetPlatformDisplayEXT != NULL);
EGLint dispattrs[] =
{
EGL_PLATFORM_ANGLE_TYPE_ANGLE, GetParam().mEGLPlatformParameters.renderer,
EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
EGL_NONE
};
mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, dispattrs);
......@@ -96,7 +92,7 @@ TEST_P(EGLQueryContextTest, GetClientVersion)
{
EGLint clientVersion;
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE);
EXPECT_TRUE(clientVersion == GetParam().mClientVersion);
EXPECT_TRUE(clientVersion == GetParam());
}
TEST_P(EGLQueryContextTest, GetRenderBufferNoSurface)
......@@ -148,5 +144,4 @@ TEST_P(EGLQueryContextTest, BadAttribute)
EXPECT_TRUE(eglGetError() == EGL_BAD_ATTRIBUTE);
}
ANGLE_INSTANTIATE_TEST(EGLQueryContextTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3(), ES2_OPENGL(),
ES3_D3D11(), ES3_OPENGL());
INSTANTIATE_TEST_CASE_P(, EGLQueryContextTest, testing::Values(2, 3));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment