1 //
2 // Copyright 2024 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6
7 // QueryTest.cpp: Tests basic boolean query of GLES1 enums.
8
9 #include "test_utils/ANGLETest.h"
10
11 #include <stdint.h>
12
13 using namespace angle;
14
15 class QueryTest : public ANGLETest<>
16 {
17 protected:
QueryTest()18 QueryTest()
19 {
20 setWindowWidth(32);
21 setWindowHeight(32);
22 setConfigRedBits(8);
23 setConfigGreenBits(8);
24 setConfigBlueBits(8);
25 setConfigAlphaBits(8);
26 setConfigDepthBits(24);
27 }
28 };
29
30 // Test that glGetBooleanv works for GLES1 enums
TEST_P(QueryTest,Basic)31 TEST_P(QueryTest, Basic)
32 {
33 std::vector<GLenum> pnames = {GL_ALPHA_TEST,
34 GL_CLIP_PLANE0,
35 GL_CLIP_PLANE1,
36 GL_CLIP_PLANE2,
37 GL_CLIP_PLANE3,
38 GL_CLIP_PLANE4,
39 GL_CLIP_PLANE5,
40 GL_COLOR_ARRAY,
41 GL_COLOR_LOGIC_OP,
42 GL_COLOR_MATERIAL,
43 GL_FOG,
44 GL_LIGHT0,
45 GL_LIGHT1,
46 GL_LIGHT2,
47 GL_LIGHT3,
48 GL_LIGHT4,
49 GL_LIGHT5,
50 GL_LIGHT6,
51 GL_LIGHT7,
52 GL_LIGHTING,
53 GL_LINE_SMOOTH,
54 GL_NORMAL_ARRAY,
55 GL_NORMALIZE,
56 GL_POINT_SIZE_ARRAY_OES,
57 GL_POINT_SMOOTH,
58 GL_POINT_SPRITE_OES,
59 GL_RESCALE_NORMAL,
60 GL_TEXTURE_2D,
61 GL_TEXTURE_CUBE_MAP,
62 GL_TEXTURE_COORD_ARRAY,
63 GL_VERTEX_ARRAY};
64
65 for (GLenum pname : pnames)
66 {
67 GLboolean data = GL_FALSE;
68 glGetBooleanv(pname, &data);
69 EXPECT_GL_NO_ERROR();
70 }
71 }
72
73 ANGLE_INSTANTIATE_TEST_ES1(QueryTest);
74