1 /*-------------------------------------------------------------------------
2 * drawElements Internal Test Module
3 * ---------------------------------
5 * Copyright 2014 The Android Open Source Project
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 delibs self-tests.
22 *//*--------------------------------------------------------------------*/
24 #include "ditDelibsTests.hpp"
27 #include "dePoolArray.h"
28 #include "dePoolHeap.h"
29 #include "dePoolHash.h"
30 #include "dePoolSet.h"
31 #include "dePoolHashSet.h"
32 #include "dePoolHashArray.h"
33 #include "dePoolMultiSet.h"
36 #include "deThreadTest.h"
39 #include "deTimerTest.h"
42 #include "deBlockBuffer.hpp"
43 #include "deFilePath.hpp"
44 #include "dePoolArray.hpp"
45 #include "deRingBuffer.hpp"
46 #include "deSharedPtr.hpp"
47 #include "deThreadSafeRingBuffer.hpp"
48 #include "deUniquePtr.hpp"
49 #include "deRandom.hpp"
50 #include "deCommandLine.hpp"
51 #include "deArrayBuffer.hpp"
52 #include "deStringUtil.hpp"
57 class DepoolTests : public tcu::TestCaseGroup
60 DepoolTests (tcu::TestContext& testCtx)
61 : tcu::TestCaseGroup(testCtx, "depool", "depool self-tests")
67 addChild(new SelfCheckCase(m_testCtx, "array", "dePoolArray_selfTest()", dePoolArray_selfTest));
68 addChild(new SelfCheckCase(m_testCtx, "heap", "dePoolHeap_selfTest()", dePoolHeap_selfTest));
69 addChild(new SelfCheckCase(m_testCtx, "hash", "dePoolHash_selfTest()", dePoolHash_selfTest));
70 addChild(new SelfCheckCase(m_testCtx, "set", "dePoolSet_selfTest()", dePoolSet_selfTest));
71 addChild(new SelfCheckCase(m_testCtx, "hash_set", "dePoolHashSet_selfTest()", dePoolHashSet_selfTest));
72 addChild(new SelfCheckCase(m_testCtx, "hash_array", "dePoolHashArray_selfTest()", dePoolHashArray_selfTest));
73 addChild(new SelfCheckCase(m_testCtx, "multi_set", "dePoolMultiSet_selfTest()", dePoolMultiSet_selfTest));
77 class DethreadTests : public tcu::TestCaseGroup
80 DethreadTests (tcu::TestContext& testCtx)
81 : tcu::TestCaseGroup(testCtx, "dethread", "dethread self-tests")
87 addChild(new SelfCheckCase(m_testCtx, "thread", "deThread_selfTest()", deThread_selfTest));
88 addChild(new SelfCheckCase(m_testCtx, "mutex", "deMutex_selfTest()", deMutex_selfTest));
89 addChild(new SelfCheckCase(m_testCtx, "semaphore", "deSemaphore_selfTest()", deSemaphore_selfTest));
90 addChild(new SelfCheckCase(m_testCtx, "atomic", "deAtomic_selfTest()", deAtomic_selfTest));
91 addChild(new SelfCheckCase(m_testCtx, "singleton", "deSingleton_selfTest()", deSingleton_selfTest));
95 class DeutilTests : public tcu::TestCaseGroup
98 DeutilTests (tcu::TestContext& testCtx)
99 : tcu::TestCaseGroup(testCtx, "deutil", "deutil self-tests")
105 addChild(new SelfCheckCase(m_testCtx, "timer", "deTimer_selfTest()", deTimer_selfTest));
109 class DecppTests : public tcu::TestCaseGroup
112 DecppTests (tcu::TestContext& testCtx)
113 : tcu::TestCaseGroup(testCtx, "decpp", "decpp self-tests")
119 addChild(new SelfCheckCase(m_testCtx, "block_buffer", "de::BlockBuffer_selfTest()", de::BlockBuffer_selfTest));
120 addChild(new SelfCheckCase(m_testCtx, "file_path", "de::FilePath_selfTest()", de::FilePath_selfTest));
121 addChild(new SelfCheckCase(m_testCtx, "pool_array", "de::PoolArray_selfTest()", de::PoolArray_selfTest));
122 addChild(new SelfCheckCase(m_testCtx, "ring_buffer", "de::RingBuffer_selfTest()", de::RingBuffer_selfTest));
123 addChild(new SelfCheckCase(m_testCtx, "shared_ptr", "de::SharedPtr_selfTest()", de::SharedPtr_selfTest));
124 addChild(new SelfCheckCase(m_testCtx, "thread_safe_ring_buffer", "de::ThreadSafeRingBuffer_selfTest()", de::ThreadSafeRingBuffer_selfTest));
125 addChild(new SelfCheckCase(m_testCtx, "unique_ptr", "de::UniquePtr_selfTest()", de::UniquePtr_selfTest));
126 addChild(new SelfCheckCase(m_testCtx, "random", "de::Random_selfTest()", de::Random_selfTest));
127 addChild(new SelfCheckCase(m_testCtx, "commandline", "de::cmdline::selfTest()", de::cmdline::selfTest));
128 addChild(new SelfCheckCase(m_testCtx, "array_buffer", "de::ArrayBuffer_selfTest()", de::ArrayBuffer_selfTest));
129 addChild(new SelfCheckCase(m_testCtx, "string_util", "de::StringUtil_selfTest()", de::StringUtil_selfTest));
133 DelibsTests::DelibsTests (tcu::TestContext& testCtx)
134 : tcu::TestCaseGroup(testCtx, "delibs", "delibs Tests")
138 DelibsTests::~DelibsTests (void)
142 void DelibsTests::init (void)
144 addChild(new DepoolTests (m_testCtx));
145 addChild(new DethreadTests (m_testCtx));
146 addChild(new DeutilTests (m_testCtx));
147 addChild(new DecppTests (m_testCtx));