1 /*-------------------------------------------------------------------------
2 * OpenGL Conformance Test Suite
3 * -----------------------------
5 * Copyright (c) 2017 The Khronos Group Inc.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 * \brief OpenGL Conformance Test Package that does not have predefined GL context.
22 */ /*-------------------------------------------------------------------*/
24 #include "glcNoDefaultContextPackage.hpp"
25 #include "glcContextFlagsTests.hpp"
26 #include "glcMultipleContextsTests.hpp"
27 #include "glcNoErrorTests.hpp"
28 #include "glcRobustnessTests.hpp"
29 #include "gluRenderContext.hpp"
33 namespace nodefaultcontext
35 class TestCaseWrapper : public tcu::TestCaseExecutor
38 TestCaseWrapper(void);
39 ~TestCaseWrapper(void);
41 void init(tcu::TestCase* testCase, const std::string& path);
42 void deinit(tcu::TestCase* testCase);
43 tcu::TestNode::IterateResult iterate(tcu::TestCase* testCase);
46 TestCaseWrapper::TestCaseWrapper(void)
50 TestCaseWrapper::~TestCaseWrapper(void)
54 void TestCaseWrapper::init(tcu::TestCase* testCase, const std::string&)
59 void TestCaseWrapper::deinit(tcu::TestCase* testCase)
64 tcu::TestNode::IterateResult TestCaseWrapper::iterate(tcu::TestCase* testCase)
66 const tcu::TestCase::IterateResult result = testCase->iterate();
72 NoDefaultContextPackage::NoDefaultContextPackage(tcu::TestContext& testCtx, const char* name)
73 : tcu::TestPackage(testCtx, name, "CTS No Default Context Package")
77 NoDefaultContextPackage::~NoDefaultContextPackage(void)
81 tcu::TestCaseExecutor* NoDefaultContextPackage::createExecutor(void) const
83 return new nodefaultcontext::TestCaseWrapper();
86 void NoDefaultContextPackage::init(void)
88 tcu::TestCaseGroup* gl30Group = new tcu::TestCaseGroup(getTestContext(), "gl30", "");
89 gl30Group->addChild(new glcts::NoErrorTests(getTestContext(), glu::ApiType::core(3, 0)));
92 tcu::TestCaseGroup* gl40Group = new tcu::TestCaseGroup(getTestContext(), "gl40", "");
93 gl40Group->addChild(new glcts::MultipleContextsTests(getTestContext(), glu::ApiType::core(4, 0)));
96 tcu::TestCaseGroup* gl45Group = new tcu::TestCaseGroup(getTestContext(), "gl45", "");
97 gl45Group->addChild(new glcts::RobustnessTests(getTestContext(), glu::ApiType::core(4, 5)));
98 gl45Group->addChild(new glcts::ContextFlagsTests(getTestContext(), glu::ApiType::core(4, 5)));
101 tcu::TestCaseGroup* es2Group = new tcu::TestCaseGroup(getTestContext(), "es2", "");
102 es2Group->addChild(new glcts::NoErrorTests(getTestContext(), glu::ApiType::es(2, 0)));
105 tcu::TestCaseGroup* es32Group = new tcu::TestCaseGroup(getTestContext(), "es32", "");
106 es32Group->addChild(new glcts::RobustnessTests(getTestContext(), glu::ApiType::es(3, 2)));
107 es32Group->addChild(new glcts::ContextFlagsTests(getTestContext(), glu::ApiType::es(3, 2)));