Add vkt::addTestGroup() utility to vktTestGroupUtil
authorPyry Haulos <phaulos@google.com>
Tue, 8 Mar 2016 23:55:36 +0000 (15:55 -0800)
committerPyry Haulos <phaulos@google.com>
Tue, 8 Mar 2016 23:55:36 +0000 (15:55 -0800)
This is similar to vkt::addFunctionCase().

Change-Id: Iaa3298c56b013c700ca7746cc6907b8bf3544200

external/vulkancts/modules/vulkan/vktTestGroupUtil.hpp

index 7a034b7..bb6a1a5 100644 (file)
@@ -94,6 +94,24 @@ tcu::TestCaseGroup* createTestGroup (tcu::TestContext&                                                                               testCtx,
        return new TestGroupHelper1<Arg0>(testCtx, name, description, createChildren, arg0);
 }
 
+inline void addTestGroup (tcu::TestCaseGroup*                                  parent,
+                                                 const std::string&                                    name,
+                                                 const std::string&                                    description,
+                                                 TestGroupHelper0::CreateChildrenFunc  createChildren)
+{
+       parent->addChild(createTestGroup(parent->getTestContext(), name, description, createChildren));
+}
+
+template<typename Arg0>
+void addTestGroup (tcu::TestCaseGroup*                                                                 parent,
+                                  const std::string&                                                                   name,
+                                  const std::string&                                                                   description,
+                                  typename TestGroupHelper1<Arg0>::CreateChildrenFunc  createChildren,
+                                  Arg0                                                                                                 arg0)
+{
+       parent->addChild(createTestGroup<Arg0>(parent->getTestContext(), name, description, createChildren, arg0));
+}
+
 } // vkt
 
 #endif // _VKTTESTGROUPUTIL_HPP