From f5f7ab71832e1c37ac962b482246ac8641fc14fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Tue, 26 Jan 2016 11:47:20 -0800 Subject: [PATCH] Check OpenVG support in negative EGL api tests. Bug: 25764793 Change-Id: I5a32dec18c68c9a40e9138caede8fccbbdc05f62 --- modules/egl/teglNegativeApiTests.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/egl/teglNegativeApiTests.cpp b/modules/egl/teglNegativeApiTests.cpp index c2b7ebc30..6eac350bc 100644 --- a/modules/egl/teglNegativeApiTests.cpp +++ b/modules/egl/teglNegativeApiTests.cpp @@ -456,24 +456,27 @@ void NegativeApiTests::init (void) log << TestLog::EndSection; - log << TestLog::Section("Test2", "EGL_BAD_CONFIG or EGL_BAD_PARAMETER is generated if config is not an EGL frame buffer configuration and if buffer is not valid OpenVG image"); + if (isAPISupported(EGL_OPENVG_API)) + { + log << TestLog::Section("Test2", "EGL_BAD_CONFIG or EGL_BAD_PARAMETER is generated if config is not an EGL frame buffer configuration and if buffer is not valid OpenVG image"); - expectNoSurface(eglCreatePbufferFromClientBuffer(display, EGL_OPENVG_IMAGE, (EGLClientBuffer)-1, (EGLConfig)-1, DE_NULL)); - expectEitherError(EGL_BAD_CONFIG, EGL_BAD_PARAMETER); + expectNoSurface(eglCreatePbufferFromClientBuffer(display, EGL_OPENVG_IMAGE, (EGLClientBuffer)-1, (EGLConfig)-1, DE_NULL)); + expectEitherError(EGL_BAD_CONFIG, EGL_BAD_PARAMETER); - log << TestLog::EndSection; + log << TestLog::EndSection; - log << TestLog::Section("Test3", "EGL_BAD_PARAMETER is generated if buftype is not EGL_OPENVG_IMAGE"); + log << TestLog::Section("Test3", "EGL_BAD_PARAMETER is generated if buftype is not EGL_OPENVG_IMAGE"); - log << TestLog::EndSection; + expectTrue(eglGetConfigs(display, &anyConfig, 1, &unused)); - expectTrue(eglGetConfigs(display, &anyConfig, 1, &unused)); + log << TestLog::EndSection; - log << TestLog::Section("Test4", "EGL_BAD_PARAMETER is generated if buffer is not valid OpenVG image"); - expectNoSurface(eglCreatePbufferFromClientBuffer(display, EGL_OPENVG_IMAGE, (EGLClientBuffer)-1, anyConfig, DE_NULL)); - expectError(EGL_BAD_PARAMETER); + log << TestLog::Section("Test4", "EGL_BAD_PARAMETER is generated if buffer is not valid OpenVG image"); + expectNoSurface(eglCreatePbufferFromClientBuffer(display, EGL_OPENVG_IMAGE, (EGLClientBuffer)-1, anyConfig, DE_NULL)); + expectError(EGL_BAD_PARAMETER); - log << TestLog::EndSection; + log << TestLog::EndSection; + } }); static const EGLint s_validGenericPbufferAttrib[] = { EGL_WIDTH, 64, EGL_HEIGHT, 64, EGL_NONE }; -- 2.34.1