test/VAAPICreateBuffer: combine .h and .cpp contents
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index cfcd8f3..e09b2a1 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -47,7 +47,6 @@
test_data.h \
test_streamable.h \
test_va_api_fixture.h \
- test_va_api_createbuffer.h \
test_va_api_display_attribs.h \
test_va_api_get_max_values.h \
test_va_api_init_terminate.h \
diff --git a/test/test_va_api_createbuffer.cpp b/test/test_va_api_createbuffer.cpp
index d121fed..b2d8312 100644
--- a/test/test_va_api_createbuffer.cpp
+++ b/test/test_va_api_createbuffer.cpp
@@ -22,7 +22,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "test_va_api_createbuffer.h"
+#include "test_va_api_fixture.h"
namespace VAAPI {
@@ -30,6 +30,14 @@
// VAEntrypoint. vaCreateBuffer doesn't require these itself but its input
// parameter do care about them.
+typedef std::pair<VAProfile, VAEntrypoint> ConfigPair;
+
+struct testInput
+{
+ ConfigPair inputConfig;
+ VABufferType inputBufferType;
+};
+
std::ostream& operator<<(std::ostream& os, const testInput& t)
{
return os << t.inputConfig.first
@@ -38,7 +46,21 @@
;
}
-typedef std::pair<VAProfile, VAEntrypoint> ConfigPair;
+class VAAPICreateBuffer
+ : public VAAPIFixture
+ , public ::testing::WithParamInterface<testInput>
+{
+public:
+ VAAPICreateBuffer()
+ {
+ m_vaDisplay = doInitialize();
+ }
+
+ virtual ~VAAPICreateBuffer()
+ {
+ doTerminate();
+ }
+};
static const std::vector<ConfigPair> decoders = {
std::make_pair(VAProfileMPEG2Simple, VAEntrypointVLD),
@@ -120,16 +142,6 @@
VAProcFilterParameterBufferType,
};
-VAAPICreateBuffer::VAAPICreateBuffer()
-{
- m_vaDisplay = doInitialize();
-}
-
-VAAPICreateBuffer::~VAAPICreateBuffer()
-{
- doTerminate();
-}
-
TEST_P(VAAPICreateBuffer, CreateBufferWithOutData)
{
// vaCreateBuffer uses a VAContextID as an input. This VAContextID requires
diff --git a/test/test_va_api_createbuffer.h b/test/test_va_api_createbuffer.h
deleted file mode 100644
index c57d4a5..0000000
--- a/test/test_va_api_createbuffer.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "test_va_api_fixture.h"
-
-namespace VAAPI {
-
-struct testInput {
- std::pair<VAProfile, VAEntrypoint> inputConfig;
- VABufferType inputBufferType;
-};
-class VAAPICreateBuffer
- : public VAAPIFixture,
- public ::testing::
- WithParamInterface<testInput > {
-
-public:
- VAAPICreateBuffer();
- virtual ~VAAPICreateBuffer();
-
-protected:
-private:
-}; // VAAPICreateBuffer
-} // namespace VAAPI