test/VAAPIQuery/CreateSurfaces: 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>
This commit is contained in:
U. Artie Eoff 2017-12-20 14:46:01 -08:00
parent 380cb1e45a
commit 8fe96acd56
3 changed files with 29 additions and 65 deletions

View File

@ -47,7 +47,6 @@ noinst_HEADERS = \
test_data.h \
test_streamable.h \
test_va_api_fixture.h \
test_va_api_createsurfaces.h \
test_va_api_createcontext.h \
test_va_api_createbuffer.h \
test_va_api_display_attribs.h \

View File

@ -22,21 +22,30 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "test_va_api_createsurfaces.h"
#include "test_va_api_fixture.h"
namespace VAAPI {
// The following tests will operate on supported profile/entrypoint
// combinations that the driver does support, there is no real need
// to report SKIPPED tests as those cases are considered on the
// get_create_config use cases and properly handled.
VAAPIQuerySurfaces::VAAPIQuerySurfaces()
class VAAPIQuerySurfaces
: public VAAPIFixture
, public ::testing::WithParamInterface<std::tuple<VAProfile, VAEntrypoint> >
{
m_vaDisplay = doInitialize();
}
VAAPIQuerySurfaces::~VAAPIQuerySurfaces() { doTerminate(); }
public:
VAAPIQuerySurfaces()
{
m_vaDisplay = doInitialize();
}
virtual ~VAAPIQuerySurfaces()
{
doTerminate();
}
};
TEST_P(VAAPIQuerySurfaces, QuerySurfacesWithCofigAttribs)
{
@ -89,12 +98,22 @@ INSTANTIATE_TEST_CASE_P(
::testing::Combine(::testing::ValuesIn(m_vaProfiles),
::testing::ValuesIn(m_vaEntrypoints)));
VAAPICreateSurfaces::VAAPICreateSurfaces()
class VAAPICreateSurfaces
: public VAAPIFixture
, public ::testing::WithParamInterface<
std::tuple<VAProfile, VAEntrypoint, std::pair<uint32_t, uint32_t> > >
{
m_vaDisplay = doInitialize();
}
public:
VAAPICreateSurfaces()
{
m_vaDisplay = doInitialize();
}
VAAPICreateSurfaces::~VAAPICreateSurfaces() { doTerminate(); }
virtual ~VAAPICreateSurfaces()
{
doTerminate();
}
};
TEST_P(VAAPICreateSurfaces, CreateSurfacesWithCofigAttribs)
{

View File

@ -1,54 +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 {
class VAAPIQuerySurfaces
: public VAAPIFixture,
public ::testing::WithParamInterface<std::tuple<VAProfile,
VAEntrypoint> > {
public:
VAAPIQuerySurfaces();
virtual ~VAAPIQuerySurfaces();
protected:
private:
}; // VAAPIQuerySurfaces
class VAAPICreateSurfaces
: public VAAPIFixture,
public ::testing::
WithParamInterface<std::tuple<VAProfile, VAEntrypoint,
std::pair<uint32_t, uint32_t> > > {
public:
VAAPICreateSurfaces();
virtual ~VAAPICreateSurfaces();
protected:
private:
}; // VAAPIQuerySurfaces
} // namespace VAAPI