• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*-------------------------------------------------------------------------
2  * OpenGL Conformance Test Suite
3  * -----------------------------
4  *
5  * Copyright (c) 2016 Google Inc.
6  * Copyright (c) 2016 The Khronos Group Inc.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */ /*!
21  * \file
22  * \brief OpenGL Conformance Test Configuration List Package
23  */ /*-------------------------------------------------------------------*/
24 
25 #include "glcConfigPackage.hpp"
26 #include "glcConfigListCase.hpp"
27 
28 #include "glcTestPackage.hpp"
29 #include "tcuTestLog.hpp"
30 
31 namespace glcts
32 {
33 namespace config
34 {
35 class TestCaseWrapper : public tcu::TestCaseExecutor
36 {
37 public:
38 	TestCaseWrapper(void);
39 	~TestCaseWrapper(void);
40 
41 	void init(tcu::TestCase* testCase, const std::string& path);
42 	void deinit(tcu::TestCase* testCase);
43 	tcu::TestNode::IterateResult iterate(tcu::TestCase* testCase);
44 };
45 
TestCaseWrapper(void)46 TestCaseWrapper::TestCaseWrapper(void)
47 {
48 }
49 
~TestCaseWrapper(void)50 TestCaseWrapper::~TestCaseWrapper(void)
51 {
52 }
53 
init(tcu::TestCase * testCase,const std::string &)54 void TestCaseWrapper::init(tcu::TestCase* testCase, const std::string&)
55 {
56 	testCase->init();
57 }
58 
deinit(tcu::TestCase * testCase)59 void TestCaseWrapper::deinit(tcu::TestCase* testCase)
60 {
61 	testCase->deinit();
62 }
63 
iterate(tcu::TestCase * testCase)64 tcu::TestNode::IterateResult TestCaseWrapper::iterate(tcu::TestCase* testCase)
65 {
66 	const tcu::TestCase::IterateResult result = testCase->iterate();
67 
68 	return result;
69 }
70 }
71 
ConfigPackage(tcu::TestContext & testCtx,const char * name)72 ConfigPackage::ConfigPackage(tcu::TestContext& testCtx, const char* name)
73 	: tcu::TestPackage(testCtx, name, "CTS Configuration List Package")
74 {
75 }
76 
~ConfigPackage(void)77 ConfigPackage::~ConfigPackage(void)
78 {
79 }
80 
createExecutor(void) const81 tcu::TestCaseExecutor* ConfigPackage::createExecutor(void) const
82 {
83 	return new config::TestCaseWrapper();
84 }
85 
init(void)86 void ConfigPackage::init(void)
87 {
88 	addChild(new ConfigListCase(m_testCtx, "es2", "OpenGL ES 2 Configurations", glu::ApiType::es(2, 0)));
89 	addChild(new ConfigListCase(m_testCtx, "es3", "OpenGL ES 3 Configurations", glu::ApiType::es(3, 0)));
90 	addChild(new ConfigListCase(m_testCtx, "es31", "OpenGL ES 3.1 Configurations", glu::ApiType::es(3, 1)));
91 	addChild(new ConfigListCase(m_testCtx, "es32", "OpenGL ES 3.2 Configurations", glu::ApiType::es(3, 2)));
92 	addChild(new ConfigListCase(m_testCtx, "gl30", "OpenGL 3.0 Configurations", glu::ApiType::core(3, 0)));
93 	addChild(new ConfigListCase(m_testCtx, "gl31", "OpenGL 3.1 Configurations", glu::ApiType::core(3, 1)));
94 	addChild(new ConfigListCase(m_testCtx, "gl32", "OpenGL 3.2 Configurations", glu::ApiType::core(3, 2)));
95 	addChild(new ConfigListCase(m_testCtx, "gl33", "OpenGL 3.3 Configurations", glu::ApiType::core(3, 3)));
96 	addChild(new ConfigListCase(m_testCtx, "gl40", "OpenGL 4.0 Configurations", glu::ApiType::core(4, 0)));
97 	addChild(new ConfigListCase(m_testCtx, "gl41", "OpenGL 4.1 Configurations", glu::ApiType::core(4, 1)));
98 	addChild(new ConfigListCase(m_testCtx, "gl42", "OpenGL 4.2 Configurations", glu::ApiType::core(4, 2)));
99 	addChild(new ConfigListCase(m_testCtx, "gl43", "OpenGL 4.3 Configurations", glu::ApiType::core(4, 3)));
100 	addChild(new ConfigListCase(m_testCtx, "gl44", "OpenGL 4.4 Configurations", glu::ApiType::core(4, 4)));
101 	addChild(new ConfigListCase(m_testCtx, "gl45", "OpenGL 4.5 Configurations", glu::ApiType::core(4, 5)));
102 	addChild(new ConfigListCase(m_testCtx, "gl46", "OpenGL 4.6 Configurations", glu::ApiType::core(4, 6)));
103 }
104 
105 } // glcts
106