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 "glcNoErrorTests.hpp"
26 #include "gluRenderContext.hpp"
30 namespace nodefaultcontext
32 class TestCaseWrapper : public tcu::TestCaseExecutor
35 TestCaseWrapper(void);
36 ~TestCaseWrapper(void);
38 void init(tcu::TestCase* testCase, const std::string& path);
39 void deinit(tcu::TestCase* testCase);
40 tcu::TestNode::IterateResult iterate(tcu::TestCase* testCase);
43 TestCaseWrapper::TestCaseWrapper(void)
47 TestCaseWrapper::~TestCaseWrapper(void)
51 void TestCaseWrapper::init(tcu::TestCase* testCase, const std::string&)
56 void TestCaseWrapper::deinit(tcu::TestCase* testCase)
61 tcu::TestNode::IterateResult TestCaseWrapper::iterate(tcu::TestCase* testCase)
63 const tcu::TestCase::IterateResult result = testCase->iterate();
69 NoDefaultContextPackage::NoDefaultContextPackage(tcu::TestContext& testCtx, const char* name)
70 : tcu::TestPackage(testCtx, name, "CTS No Default Context Package")
74 NoDefaultContextPackage::~NoDefaultContextPackage(void)
78 tcu::TestCaseExecutor* NoDefaultContextPackage::createExecutor(void) const
80 return new nodefaultcontext::TestCaseWrapper();
83 void NoDefaultContextPackage::init(void)
85 tcu::TestCaseGroup* gl30Group = new tcu::TestCaseGroup(getTestContext(), "gl30", "");
86 gl30Group->addChild(new glcts::NoErrorTests(getTestContext(), glu::ApiType::core(3, 0)));
88 tcu::TestCaseGroup* es2Group = new tcu::TestCaseGroup(getTestContext(), "es2", "");
89 es2Group->addChild(new glcts::NoErrorTests(getTestContext(), glu::ApiType::es(2, 0)));