Hash :
b6eb3412
Author :
Date :
2019-03-06T15:10:56
Allow testing::Combine in ANGLE_INSTANTIATE_TEST
In most tests, ANGLE_INSTANTIATE_TEST is sufficient. This macro takes a
a variable number of angle::PlatformParameters and instantiates that
many tests. angle::PlatformParameters already aggregates multiple
configurations.
In a number of cases, however, it would be useful to have even more
configurations in conjunction with angle::PlatformParameters.
gl_tests/MultiviewDrawTest.cpp solves this by creating a custom class
that combines angle::PlatformParameters with test-specific
configurations. gl_tests/CopyTextureTest.cpp included numerous tests
with hardcoded values for its configurations.
This change introduces ANGLE_INSTANTIATE_TEST_COMBINE_N. These macros
take N testing::* parameter generators followed by the list of
angle::PlatformParameters as per ANGLE_INSTANTIATE_TEST. They then
testing::Combine these generators, placing the angle::PlatformParameters
list first.
Tests that use this functionality would inherit from
ANGLETestWithParams<std::tuple<angle::PlatformParameters, ...>> instead
of ANGLETest, and instantiate their tests as such:
ANGLE_INSTANTIATE_TEST_COMBINE_3(TestName,
PrettyPrintFunction,
testing::ValuesIn(listOfParameters),
testing::Values(some, other, parameters),
testing::Bool(),
ES2_D3D9(),
ES2_D3D11(),
ES2_OPENGL(),
ES2_OPENGLES(),
ES2_VULKAN());
The name of the test, as used by --gtest_filter, will be suffixed with
the output of the PrettyPrintFunction. Assuming the tuple type given to
ANGLETestWithParams is Params, this function takes a
::testing::TestParamInfo<Params> input to pretty-print the name of the
test variation. It is recommended to output the platform first for
consistency with other tests.
gl_tests/CopyTextureTest.cpp is modified to use this macro.
Bug: angleproject:3125
Change-Id: I0311b84659578bf3c7b5e9673b41cc3a3adfc50d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1506236
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ANGLETest:
// Implementation of common ANGLE testing fixture.
//
#ifndef ANGLE_TESTS_ANGLE_TEST_H_
#define ANGLE_TESTS_ANGLE_TEST_H_
#include <gtest/gtest.h>
#include <algorithm>
#include <array>
#include "angle_test_configs.h"
#include "common/angleutils.h"
#include "common/vector_utils.h"
#include "platform/Platform.h"
#include "util/shader_utils.h"
#include "util/system_utils.h"
#include "util/util_gl.h"
namespace angle
{
struct SystemInfo;
} // namespace angle
#define ASSERT_GL_TRUE(a) ASSERT_EQ(static_cast<GLboolean>(GL_TRUE), (a))
#define ASSERT_GL_FALSE(a) ASSERT_EQ(static_cast<GLboolean>(GL_FALSE), (a))
#define EXPECT_GL_TRUE(a) EXPECT_EQ(static_cast<GLboolean>(GL_TRUE), (a))
#define EXPECT_GL_FALSE(a) EXPECT_EQ(static_cast<GLboolean>(GL_FALSE), (a))
#define EXPECT_GL_ERROR(err) EXPECT_EQ(static_cast<GLenum>(err), glGetError())
#define EXPECT_GL_NO_ERROR() EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError())
#define ASSERT_GL_ERROR(err) ASSERT_EQ(static_cast<GLenum>(err), glGetError())
#define ASSERT_GL_NO_ERROR() ASSERT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError())
#define EXPECT_EGL_ERROR(err) EXPECT_EQ((err), eglGetError())
#define EXPECT_EGL_SUCCESS() EXPECT_EGL_ERROR(EGL_SUCCESS)
// EGLBoolean is |unsigned int| but EGL_TRUE is 0, not 0u.
#define ASSERT_EGL_TRUE(a) ASSERT_EQ(static_cast<EGLBoolean>(EGL_TRUE), static_cast<EGLBoolean>(a))
#define ASSERT_EGL_FALSE(a) \
ASSERT_EQ(static_cast<EGLBoolean>(EGL_FALSE), static_cast<EGLBoolean>(a))
#define EXPECT_EGL_TRUE(a) EXPECT_EQ(static_cast<EGLBoolean>(EGL_TRUE), static_cast<EGLBoolean>(a))
#define EXPECT_EGL_FALSE(a) \
EXPECT_EQ(static_cast<EGLBoolean>(EGL_FALSE), static_cast<EGLBoolean>(a))
#define ASSERT_EGL_ERROR(err) ASSERT_EQ((err), eglGetError())
#define ASSERT_EGL_SUCCESS() ASSERT_EGL_ERROR(EGL_SUCCESS)
#define ASSERT_GLENUM_EQ(expected, actual) \
ASSERT_EQ(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define EXPECT_GLENUM_EQ(expected, actual) \
EXPECT_EQ(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define ASSERT_GLENUM_NE(expected, actual) \
ASSERT_NE(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define EXPECT_GLENUM_NE(expected, actual) \
EXPECT_NE(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define ASSERT_EGLENUM_EQ(expected, actual) \
ASSERT_EQ(static_cast<EGLenum>(expected), static_cast<EGLenum>(actual))
#define EXPECT_EGLENUM_EQ(expected, actual) \
EXPECT_EQ(static_cast<EGLenum>(expected), static_cast<EGLenum>(actual))
namespace angle
{
struct GLColorRGB
{
GLColorRGB();
GLColorRGB(GLubyte r, GLubyte g, GLubyte b);
GLColorRGB(const angle::Vector3 &floatColor);
GLubyte R, G, B;
static const GLColorRGB black;
static const GLColorRGB blue;
static const GLColorRGB green;
static const GLColorRGB red;
static const GLColorRGB yellow;
};
struct GLColor
{
GLColor();
GLColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a);
GLColor(const angle::Vector4 &floatColor);
GLColor(GLuint colorValue);
angle::Vector4 toNormalizedVector() const;
GLubyte &operator[](size_t index) { return (&R)[index]; }
const GLubyte &operator[](size_t index) const { return (&R)[index]; }
testing::AssertionResult ExpectNear(const GLColor &expected, const GLColor &err) const;
GLubyte R, G, B, A;
static const GLColor black;
static const GLColor blue;
static const GLColor cyan;
static const GLColor green;
static const GLColor red;
static const GLColor transparentBlack;
static const GLColor white;
static const GLColor yellow;
static const GLColor magenta;
};
struct GLColor32F
{
constexpr GLColor32F() : GLColor32F(0.0f, 0.0f, 0.0f, 0.0f) {}
constexpr GLColor32F(GLfloat r, GLfloat g, GLfloat b, GLfloat a) : R(r), G(g), B(b), A(a) {}
GLfloat R, G, B, A;
};
static constexpr GLColor32F kFloatRed = {1.0f, 0.0f, 0.0f, 1.0f};
static constexpr GLColor32F kFloatGreen = {0.0f, 1.0f, 0.0f, 1.0f};
static constexpr GLColor32F kFloatBlue = {0.0f, 0.0f, 1.0f, 1.0f};
// The input here for pixelPoints are the expected integer window coordinates, we add .5 to every
// one of them and re-scale the numbers to be between [-1,1]. Using this technique, we can make
// sure the rasterization stage will end up drawing pixels at the expected locations.
void CreatePixelCenterWindowCoords(const std::vector<Vector2> &pixelPoints,
int windowWidth,
int windowHeight,
std::vector<Vector3> *outVertices);
// Useful to cast any type to GLubyte.
template <typename TR, typename TG, typename TB, typename TA>
GLColor MakeGLColor(TR r, TG g, TB b, TA a)
{
return GLColor(static_cast<GLubyte>(r), static_cast<GLubyte>(g), static_cast<GLubyte>(b),
static_cast<GLubyte>(a));
}
bool operator==(const GLColor &a, const GLColor &b);
bool operator!=(const GLColor &a, const GLColor &b);
std::ostream &operator<<(std::ostream &ostream, const GLColor &color);
GLColor ReadColor(GLint x, GLint y);
// Useful to cast any type to GLfloat.
template <typename TR, typename TG, typename TB, typename TA>
GLColor32F MakeGLColor32F(TR r, TG g, TB b, TA a)
{
return GLColor32F(static_cast<GLfloat>(r), static_cast<GLfloat>(g), static_cast<GLfloat>(b),
static_cast<GLfloat>(a));
}
bool operator==(const GLColor32F &a, const GLColor32F &b);
std::ostream &operator<<(std::ostream &ostream, const GLColor32F &color);
GLColor32F ReadColor32F(GLint x, GLint y);
} // namespace angle
#define EXPECT_PIXEL_EQ(x, y, r, g, b, a) \
EXPECT_EQ(angle::MakeGLColor(r, g, b, a), angle::ReadColor(x, y))
#define EXPECT_PIXEL_NE(x, y, r, g, b, a) \
EXPECT_NE(angle::MakeGLColor(r, g, b, a), angle::ReadColor(x, y))
#define EXPECT_PIXEL_32F_EQ(x, y, r, g, b, a) \
EXPECT_EQ(angle::MakeGLColor32F(r, g, b, a), angle::ReadColor32F(x, y))
#define EXPECT_PIXEL_ALPHA_EQ(x, y, a) EXPECT_EQ(a, angle::ReadColor(x, y).A)
#define EXPECT_PIXEL_ALPHA32F_EQ(x, y, a) EXPECT_EQ(a, angle::ReadColor32F(x, y).A)
#define EXPECT_PIXEL_COLOR_EQ(x, y, angleColor) EXPECT_EQ(angleColor, angle::ReadColor(x, y))
#define EXPECT_PIXEL_COLOR_EQ_VEC2(vec2, angleColor) \
EXPECT_EQ(angleColor, \
angle::ReadColor(static_cast<GLint>(vec2.x()), static_cast<GLint>(vec2.y())))
#define EXPECT_PIXEL_COLOR32F_EQ(x, y, angleColor) EXPECT_EQ(angleColor, angle::ReadColor32F(x, y))
#define EXPECT_PIXEL_RECT_EQ(x, y, width, height, color) \
do \
{ \
std::vector<GLColor> actualColors(width *height); \
glReadPixels((x), (y), (width), (height), GL_RGBA, GL_UNSIGNED_BYTE, actualColors.data()); \
std::vector<GLColor> expectedColors(width *height, color); \
EXPECT_EQ(expectedColors, actualColors); \
} while (0)
#define EXPECT_PIXEL_NEAR(x, y, r, g, b, a, abs_error) \
do \
{ \
GLubyte pixel[4]; \
glReadPixels((x), (y), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); \
EXPECT_GL_NO_ERROR(); \
EXPECT_NEAR((r), pixel[0], abs_error); \
EXPECT_NEAR((g), pixel[1], abs_error); \
EXPECT_NEAR((b), pixel[2], abs_error); \
EXPECT_NEAR((a), pixel[3], abs_error); \
} while (0)
#define EXPECT_PIXEL32F_NEAR(x, y, r, g, b, a, abs_error) \
do \
{ \
GLfloat pixel[4]; \
glReadPixels((x), (y), 1, 1, GL_RGBA, GL_FLOAT, pixel); \
EXPECT_GL_NO_ERROR(); \
EXPECT_NEAR((r), pixel[0], abs_error); \
EXPECT_NEAR((g), pixel[1], abs_error); \
EXPECT_NEAR((b), pixel[2], abs_error); \
EXPECT_NEAR((a), pixel[3], abs_error); \
} while (0)
// TODO(jmadill): Figure out how we can use GLColor's nice printing with EXPECT_NEAR.
#define EXPECT_PIXEL_COLOR_NEAR(x, y, angleColor, abs_error) \
EXPECT_PIXEL_NEAR(x, y, angleColor.R, angleColor.G, angleColor.B, angleColor.A, abs_error)
#define EXPECT_PIXEL_COLOR32F_NEAR(x, y, angleColor, abs_error) \
EXPECT_PIXEL32F_NEAR(x, y, angleColor.R, angleColor.G, angleColor.B, angleColor.A, abs_error)
#define EXPECT_COLOR_NEAR(expected, actual, abs_error) \
do \
{ \
EXPECT_NEAR(expected.R, actual.R, abs_error); \
EXPECT_NEAR(expected.G, actual.G, abs_error); \
EXPECT_NEAR(expected.B, actual.B, abs_error); \
EXPECT_NEAR(expected.A, actual.A, abs_error); \
} while (0)
#define EXPECT_PIXEL32F_NEAR(x, y, r, g, b, a, abs_error) \
do \
{ \
GLfloat pixel[4]; \
glReadPixels((x), (y), 1, 1, GL_RGBA, GL_FLOAT, pixel); \
EXPECT_GL_NO_ERROR(); \
EXPECT_NEAR((r), pixel[0], abs_error); \
EXPECT_NEAR((g), pixel[1], abs_error); \
EXPECT_NEAR((b), pixel[2], abs_error); \
EXPECT_NEAR((a), pixel[3], abs_error); \
} while (0)
#define EXPECT_PIXEL_COLOR32F_NEAR(x, y, angleColor, abs_error) \
EXPECT_PIXEL32F_NEAR(x, y, angleColor.R, angleColor.G, angleColor.B, angleColor.A, abs_error)
class ANGLETestBase;
class EGLWindow;
class GLWindowBase;
class OSWindow;
class WGLWindow;
struct TestPlatformContext final : private angle::NonCopyable
{
bool ignoreMessages = false;
bool warningsAsErrors = false;
ANGLETestBase *currentTest = nullptr;
};
class ANGLETestBase
{
protected:
ANGLETestBase(const angle::PlatformParameters ¶ms);
virtual ~ANGLETestBase();
public:
static bool InitTestWindow();
static bool DestroyTestWindow();
static void SetWindowVisible(bool isVisible);
static bool eglDisplayExtensionEnabled(EGLDisplay display, const std::string &extName);
virtual void overrideWorkaroundsD3D(angle::WorkaroundsD3D *workaroundsD3D) {}
virtual void overrideFeaturesVk(angle::FeaturesVk *workaroundsVulkan) {}
protected:
void ANGLETestSetUp();
void ANGLETestTearDown();
virtual void swapBuffers();
void setupQuadVertexBuffer(GLfloat positionAttribZ, GLfloat positionAttribXYScale);
void setupIndexedQuadVertexBuffer(GLfloat positionAttribZ, GLfloat positionAttribXYScale);
void setupIndexedQuadIndexBuffer();
void drawQuad(GLuint program, const std::string &positionAttribName, GLfloat positionAttribZ);
void drawQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale);
void drawQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useVertexBuffer);
void drawQuadInstanced(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useVertexBuffer,
GLuint numInstances);
static std::array<angle::Vector3, 6> GetQuadVertices();
static std::array<GLushort, 6> GetQuadIndices();
static std::array<angle::Vector3, 4> GetIndexedQuadVertices();
void drawIndexedQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ);
void drawIndexedQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale);
void drawIndexedQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useBufferObject);
void drawIndexedQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useBufferObject,
bool restrictedRange);
void draw2DTexturedQuad(GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useVertexBuffer);
// The layer parameter chooses the 3D texture layer to sample from.
void draw3DTexturedQuad(GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useVertexBuffer,
float layer);
static bool extensionEnabled(const std::string &extName);
static bool extensionRequestable(const std::string &extName);
static bool ensureExtensionEnabled(const std::string &extName);
static bool eglClientExtensionEnabled(const std::string &extName);
static bool eglDeviceExtensionEnabled(EGLDeviceEXT device, const std::string &extName);
void setWindowWidth(int width);
void setWindowHeight(int height);
void setConfigRedBits(int bits);
void setConfigGreenBits(int bits);
void setConfigBlueBits(int bits);
void setConfigAlphaBits(int bits);
void setConfigDepthBits(int bits);
void setConfigStencilBits(int bits);
void setConfigComponentType(EGLenum componentType);
void setMultisampleEnabled(bool enabled);
void setSamples(EGLint samples);
void setDebugEnabled(bool enabled);
void setNoErrorEnabled(bool enabled);
void setWebGLCompatibilityEnabled(bool webglCompatibility);
void setExtensionsEnabled(bool extensionsEnabled);
void setRobustAccess(bool enabled);
void setBindGeneratesResource(bool bindGeneratesResource);
void setDebugLayersEnabled(bool enabled);
void setClientArraysEnabled(bool enabled);
void setRobustResourceInit(bool enabled);
void setContextProgramCacheEnabled(bool enabled);
void setContextVirtualization(bool enabled);
// Some EGL extension tests would like to defer the Context init until the test body.
void setDeferContextInit(bool enabled);
int getClientMajorVersion() const;
int getClientMinorVersion() const;
GLWindowBase *getGLWindow() const;
EGLWindow *getEGLWindow() const;
int getWindowWidth() const;
int getWindowHeight() const;
bool isMultisampleEnabled() const;
EGLint getPlatformRenderer() const;
void ignoreD3D11SDKLayersWarnings();
// Allows a test to be more restrictive about platform warnings.
void treatPlatformWarningsAsErrors();
static OSWindow *GetOSWindow() { return mOSWindow; }
GLuint get2DTexturedQuadProgram();
// Has a float uniform "u_layer" to choose the 3D texture layer.
GLuint get3DTexturedQuadProgram();
angle::PlatformMethods mPlatformMethods;
class ScopedIgnorePlatformMessages : angle::NonCopyable
{
public:
ScopedIgnorePlatformMessages(ANGLETestBase *test);
~ScopedIgnorePlatformMessages();
private:
ANGLETestBase *mTest;
};
private:
void checkD3D11SDKLayersMessages();
bool hasNvidiaGPU();
void drawQuad(GLuint program,
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale,
bool useVertexBuffer,
bool useInstancedDrawCalls,
GLuint numInstances);
EGLWindow *mEGLWindow;
WGLWindow *mWGLWindow;
int mWidth;
int mHeight;
bool mIgnoreD3D11SDKLayersWarnings;
// Used for indexed quad rendering
GLuint mQuadVertexBuffer;
GLuint mQuadIndexBuffer;
// Used for texture rendering.
GLuint m2DTexturedQuadProgram;
GLuint m3DTexturedQuadProgram;
TestPlatformContext mPlatformContext;
bool mDeferContextInit;
static OSWindow *mOSWindow;
// Workaround for NVIDIA not being able to share a window with OpenGL and Vulkan.
static Optional<EGLint> mLastRendererType;
};
template <typename Params = angle::PlatformParameters>
class ANGLETestWithParam : public ANGLETestBase, public ::testing::TestWithParam<Params>
{
protected:
ANGLETestWithParam();
public:
void SetUp() override { ANGLETestBase::ANGLETestSetUp(); }
void TearDown() override { ANGLETestBase::ANGLETestTearDown(); }
};
template <typename Params>
ANGLETestWithParam<Params>::ANGLETestWithParam()
: ANGLETestBase(std::get<angle::PlatformParameters>(this->GetParam()))
{}
template <>
inline ANGLETestWithParam<angle::PlatformParameters>::ANGLETestWithParam()
: ANGLETestBase(this->GetParam())
{}
// Note: this hack is not necessary in C++17. Once we switch to C++17, we can just rename
// ANGLETestWithParam to ANGLETest.
using ANGLETest = ANGLETestWithParam<>;
class ANGLETestEnvironment : public testing::Environment
{
public:
void SetUp() override;
void TearDown() override;
static angle::Library *GetEGLLibrary();
static angle::Library *GetWGLLibrary();
static angle::SystemInfo *GetSystemInfo();
private:
// For loading entry points.
static std::unique_ptr<angle::Library> gEGLLibrary;
static std::unique_ptr<angle::Library> gWGLLibrary;
static std::unique_ptr<angle::SystemInfo> gSystemInfo;
};
// This base fixture loads the EGL entry points.
class EGLTest : public testing::Test
{
public:
EGLTest();
~EGLTest();
void SetUp() override;
};
// Driver vendors
bool IsIntel();
bool IsAdreno();
bool IsAMD();
bool IsNVIDIA();
// Renderer back-ends
// Note: FL9_3 is explicitly *not* considered D3D11.
bool IsD3D11();
bool IsD3D11_FL93();
// Is a D3D9-class renderer.
bool IsD3D9();
// Is D3D9 or SM9_3 renderer.
bool IsD3DSM3();
bool IsDesktopOpenGL();
bool IsOpenGLES();
bool IsOpenGL();
bool IsNULL();
bool IsVulkan();
// Debug/Release
bool IsDebug();
bool IsRelease();
bool IsDisplayExtensionEnabled(EGLDisplay display, const std::string &extName);
// Note: git cl format messes up this formatting.
#define ANGLE_SKIP_TEST_IF(COND) \
do \
{ \
if (COND) \
{ \
std::cout << "Test skipped: " #COND "." << std::endl; \
return; \
} \
} while (0)
#endif // ANGLE_TESTS_ANGLE_TEST_H_