Commit 4322bc18 authored by Sebastien Alaiwan's avatar Sebastien Alaiwan
Browse files

Fix constructor order in unit tests (sanitizer)

The WithParamTest constructor needs to be called first, as the
EncoderTest constructor is called with 'GET_PARAM'.

BUG=aomedia:580

Change-Id: I17f3c02c0a0eec103fb3505301b5eb6dfdef851c
parent ce0a9ea3
...@@ -22,8 +22,8 @@ const int kVideoSourceHeight = 240; ...@@ -22,8 +22,8 @@ const int kVideoSourceHeight = 240;
const int kFramesToEncode = 2; const int kFramesToEncode = 2;
class RealtimeTest class RealtimeTest
: public ::libaom_test::EncoderTest, : public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> { public ::libaom_test::EncoderTest {
protected: protected:
RealtimeTest() : EncoderTest(GET_PARAM(0)), frame_packets_(0) {} RealtimeTest() : EncoderTest(GET_PARAM(0)), frame_packets_(0) {}
virtual ~RealtimeTest() {} virtual ~RealtimeTest() {}
......
...@@ -265,8 +265,8 @@ class ResizingVideoSource : public ::libaom_test::DummyVideoSource { ...@@ -265,8 +265,8 @@ class ResizingVideoSource : public ::libaom_test::DummyVideoSource {
}; };
class ResizeTest class ResizeTest
: public ::libaom_test::EncoderTest, : public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> { public ::libaom_test::EncoderTest {
protected: protected:
ResizeTest() : EncoderTest(GET_PARAM(0)) {} ResizeTest() : EncoderTest(GET_PARAM(0)) {}
...@@ -427,8 +427,8 @@ TEST_P(ResizeInternalTest, TestInternalResizeChangeConfig) { ...@@ -427,8 +427,8 @@ TEST_P(ResizeInternalTest, TestInternalResizeChangeConfig) {
} }
class ResizeRealtimeTest class ResizeRealtimeTest
: public ::libaom_test::EncoderTest, : public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode, int>,
public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode, int> { public ::libaom_test::EncoderTest {
protected: protected:
ResizeRealtimeTest() : EncoderTest(GET_PARAM(0)) {} ResizeRealtimeTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~ResizeRealtimeTest() {} virtual ~ResizeRealtimeTest() {}
......
...@@ -231,8 +231,8 @@ class SADTestBase : public ::testing::Test { ...@@ -231,8 +231,8 @@ class SADTestBase : public ::testing::Test {
ACMRandom rnd_; ACMRandom rnd_;
}; };
class SADx4Test : public SADTestBase, class SADx4Test : public ::testing::WithParamInterface<SadMxNx4Param>,
public ::testing::WithParamInterface<SadMxNx4Param> { public SADTestBase {
public: public:
SADx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {} SADx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
...@@ -257,8 +257,8 @@ class SADx4Test : public SADTestBase, ...@@ -257,8 +257,8 @@ class SADx4Test : public SADTestBase,
} }
}; };
class SADTest : public SADTestBase, class SADTest : public ::testing::WithParamInterface<SadMxNParam>,
public ::testing::WithParamInterface<SadMxNParam> { public SADTestBase {
public: public:
SADTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {} SADTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
...@@ -288,8 +288,8 @@ class SADTest : public SADTestBase, ...@@ -288,8 +288,8 @@ class SADTest : public SADTestBase,
} }
}; };
class SADavgTest : public SADTestBase, class SADavgTest : public ::testing::WithParamInterface<SadMxNAvgParam>,
public ::testing::WithParamInterface<SadMxNAvgParam> { public SADTestBase {
public: public:
SADavgTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {} SADavgTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
......
...@@ -25,8 +25,8 @@ const int kTileRows = 2; ...@@ -25,8 +25,8 @@ const int kTileRows = 2;
typedef std::tr1::tuple<libaom_test::TestMode, int, int> SuperframeTestParam; typedef std::tr1::tuple<libaom_test::TestMode, int, int> SuperframeTestParam;
class SuperframeTest class SuperframeTest
: public ::libaom_test::EncoderTest, : public ::libaom_test::CodecTestWithParam<SuperframeTestParam>,
public ::libaom_test::CodecTestWithParam<SuperframeTestParam> { public ::libaom_test::EncoderTest {
protected: protected:
SuperframeTest() SuperframeTest()
: EncoderTest(GET_PARAM(0)), modified_buf_(NULL), last_sf_pts_(0) {} : EncoderTest(GET_PARAM(0)), modified_buf_(NULL), last_sf_pts_(0) {}
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
namespace { namespace {
class TileIndependenceTest class TileIndependenceTest
: public ::libaom_test::EncoderTest, : public ::libaom_test::CodecTestWith2Params<int, int>,
public ::libaom_test::CodecTestWith2Params<int, int> { public ::libaom_test::EncoderTest {
protected: protected:
TileIndependenceTest() TileIndependenceTest()
: EncoderTest(GET_PARAM(0)), md5_fw_order_(), md5_inv_order_(), : EncoderTest(GET_PARAM(0)), md5_fw_order_(), md5_inv_order_(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment