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 "glcNoErrorTests.hpp"
27 #include "glcRobustnessTests.hpp"
28 #include "gluRenderContext.hpp"
32 namespace nodefaultcontext
34 class TestCaseWrapper : public tcu::TestCaseExecutor
37 TestCaseWrapper(void);
38 ~TestCaseWrapper(void);
40 void init(tcu::TestCase* testCase, const std::string& path);
41 void deinit(tcu::TestCase* testCase);
42 tcu::TestNode::IterateResult iterate(tcu::TestCase* testCase);
45 TestCaseWrapper::TestCaseWrapper(void)
49 TestCaseWrapper::~TestCaseWrapper(void)
53 void TestCaseWrapper::init(tcu::TestCase* testCase, const std::string&)
58 void TestCaseWrapper::deinit(tcu::TestCase* testCase)
63 tcu::TestNode::IterateResult TestCaseWrapper::iterate(tcu::TestCase* testCase)
65 const tcu::TestCase::IterateResult result = testCase->iterate();
71 NoDefaultContextPackage::NoDefaultContextPackage(tcu::TestContext& testCtx, const char* name)
72 : tcu::TestPackage(testCtx, name, "CTS No Default Context Package")
76 NoDefaultContextPackage::~NoDefaultContextPackage(void)
80 tcu::TestCaseExecutor* NoDefaultContextPackage::createExecutor(void) const
82 return new nodefaultcontext::TestCaseWrapper();
85 void NoDefaultContextPackage::init(void)
87 tcu::TestCaseGroup* gl30Group = new tcu::TestCaseGroup(getTestContext(), "gl30", "");
88 gl30Group->addChild(new glcts::NoErrorTests(getTestContext(), glu::ApiType::core(3, 0)));
91 tcu::TestCaseGroup* gl45Group = new tcu::TestCaseGroup(getTestContext(), "gl45", "");
92 gl45Group->addChild(new glcts::RobustnessTests(getTestContext(), glu::ApiType::core(4, 5)));
93 gl45Group->addChild(new glcts::ContextFlagsTests(getTestContext(), glu::ApiType::core(4, 5)));
96 tcu::TestCaseGroup* es2Group = new tcu::TestCaseGroup(getTestContext(), "es2", "");
97 es2Group->addChild(new glcts::NoErrorTests(getTestContext(), glu::ApiType::es(2, 0)));
100 tcu::TestCaseGroup* es32Group = new tcu::TestCaseGroup(getTestContext(), "es32", "");
101 es32Group->addChild(new glcts::RobustnessTests(getTestContext(), glu::ApiType::es(3, 2)));
102 es32Group->addChild(new glcts::ContextFlagsTests(getTestContext(), glu::ApiType::es(3, 2)));