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

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
......@@ -59,8 +59,8 @@ void GenerateMap(int mb_rows, int mb_cols, const aom_image_t &current,
const int kAqModeCyclicRefresh = 3;
class ActiveMapRefreshTest
: 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:
ActiveMapRefreshTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~ActiveMapRefreshTest() {}
......
......@@ -20,8 +20,8 @@
namespace {
class ActiveMapTest
: 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:
static const int kWidth = 208;
static const int kHeight = 144;
......
......@@ -17,8 +17,8 @@
namespace {
class AltRefForcedKeyTestLarge
: 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:
AltRefForcedKeyTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
......
......@@ -28,8 +28,8 @@ namespace {
const char kTestVideoName[] = "niklas_1280_720_30.y4m";
const int kTestVideoFrames = 10;
class AnsCodecTest : public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<int> {
class AnsCodecTest : public ::libaom_test::CodecTestWithParam<int>,
public ::libaom_test::EncoderTest {
protected:
AnsCodecTest()
: EncoderTest(GET_PARAM(0)), ans_window_size_log2_(GET_PARAM(1)) {}
......
......@@ -19,8 +19,8 @@
namespace {
class AqSegmentTest
: 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:
AqSegmentTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~AqSegmentTest() {}
......
......@@ -76,9 +76,9 @@ int is_extension_y4m(const char *filename) {
}
class ArfFreqTestLarge
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith3Params<TestVideoParam,
TestEncodeParam, int> {
: public ::libaom_test::CodecTestWith3Params<TestVideoParam,
TestEncodeParam, int>,
public ::libaom_test::EncoderTest {
protected:
ArfFreqTestLarge()
: EncoderTest(GET_PARAM(0)), test_video_param_(GET_PARAM(1)),
......
......@@ -33,8 +33,8 @@ const int kImgHeight = 576;
// This test tests "tile_encoding_mode = TILE_VR" case. The TILE_NORMAL case is
// tested by the tile_independence test.
class AV1ExtTileTest
: 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:
AV1ExtTileTest()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
......
......@@ -20,8 +20,8 @@
namespace {
class BordersTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
: public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::EncoderTest {
protected:
BordersTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~BordersTest() {}
......
......@@ -21,8 +21,8 @@ namespace {
const int kMaxPSNR = 100;
class CpuSpeedTest
: 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:
CpuSpeedTest()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
......
......@@ -21,8 +21,8 @@
namespace {
class DatarateTestLarge
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode, int> {
: public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode, int>,
public ::libaom_test::EncoderTest {
public:
DatarateTestLarge() : EncoderTest(GET_PARAM(0)) {}
......
......@@ -93,8 +93,8 @@ TEST_P(DecodePerfTest, PerfTest) {
// ::testing::ValuesIn(kAV1DecodePerfVectors));
class AV1NewEncodeDecodePerfTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
: public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::EncoderTest {
protected:
AV1NewEncodeDecodePerfTest()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)), speed_(0),
......
......@@ -56,8 +56,8 @@ const int kEncodePerfTestThreads[] = { 1, 2, 4 };
#define NELEMENTS(x) (sizeof((x)) / sizeof((x)[0]))
class AV1EncodePerfTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
: public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::EncoderTest {
protected:
AV1EncodePerfTest()
: EncoderTest(GET_PARAM(0)), min_psnr_(kMaxPsnr), nframes_(0),
......
......@@ -54,9 +54,10 @@ const EncodeParameters kAV1EncodeParameterSet[] = {
};
class AvxEncoderParmsGetToDecoder
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith2Params<EncodeParameters,
EncodePerfTestVideo> {
: public ::libaom_test::CodecTestWith2Params<EncodeParameters,
EncodePerfTestVideo>,
public ::libaom_test::EncoderTest,
{
protected:
AvxEncoderParmsGetToDecoder()
: EncoderTest(GET_PARAM(0)), encode_parms(GET_PARAM(1)) {}
......
......@@ -86,9 +86,9 @@ int is_extension_y4m(const char *filename) {
}
class EndToEndTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith3Params<libaom_test::TestMode,
TestVideoParam, int> {
: public ::libaom_test::CodecTestWith3Params<libaom_test::TestMode,
TestVideoParam, int>,
public ::libaom_test::EncoderTest {
protected:
EndToEndTest()
: EncoderTest(GET_PARAM(0)), test_video_param_(GET_PARAM(2)),
......
......@@ -21,8 +21,8 @@ const int kMaxErrorFrames = 12;
const int kMaxDroppableFrames = 12;
class ErrorResilienceTestLarge
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
: public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::EncoderTest {
protected:
ErrorResilienceTestLarge()
: EncoderTest(GET_PARAM(0)), psnr_(0.0), nframes_(0), mismatch_psnr_(0.0),
......
......@@ -20,8 +20,8 @@
namespace {
class AVxEncoderThreadTest
: 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:
AVxEncoderThreadTest()
: EncoderTest(GET_PARAM(0)), encoder_initialized_(false),
......
......@@ -15,8 +15,8 @@
namespace {
class AV1FrameSizeTests : public ::libaom_test::EncoderTest,
public ::testing::Test {
class AV1FrameSizeTests : public ::testing::Test,
public ::libaom_test::EncoderTest {
protected:
AV1FrameSizeTests()
: EncoderTest(&::libaom_test::kAV1), expected_res_(AOM_CODEC_OK) {}
......
......@@ -17,8 +17,8 @@
namespace {
class LevelTest
: 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:
LevelTest()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
......
......@@ -23,8 +23,8 @@ namespace {
const int kMaxPsnr = 100;
class LosslessTestLarge
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
: public ::libaom_test::CodecTestWithParam<libaom_test::TestMode>,
public ::libaom_test::EncoderTest {
protected:
LosslessTestLarge()
: EncoderTest(GET_PARAM(0)), psnr_(kMaxPsnr), nframes_(0),
......
......@@ -32,9 +32,9 @@ const int kCpuUsedVectors[] = { 1, 5 };
const int kMVTestModes[] = { MAX_EXTREME_MV, MIN_EXTREME_MV };
class MotionVectorTestLarge
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith3Params<libaom_test::TestMode, int,
int> {
: public ::libaom_test::CodecTestWith3Params<libaom_test::TestMode, int,
int>,
public ::libaom_test::EncoderTest {
protected:
MotionVectorTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
......
......@@ -22,8 +22,8 @@ const int kVideoSourceHeight = 240;
const int kFramesToEncode = 2;
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:
RealtimeTest() : EncoderTest(GET_PARAM(0)), frame_packets_(0) {}
virtual ~RealtimeTest() {}
......
......@@ -265,8 +265,8 @@ class ResizingVideoSource : public ::libaom_test::DummyVideoSource {
};
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:
ResizeTest() : EncoderTest(GET_PARAM(0)) {}
......@@ -427,8 +427,8 @@ TEST_P(ResizeInternalTest, TestInternalResizeChangeConfig) {
}
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:
ResizeRealtimeTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~ResizeRealtimeTest() {}
......
......@@ -231,8 +231,8 @@ class SADTestBase : public ::testing::Test {
ACMRandom rnd_;
};
class SADx4Test : public SADTestBase,
public ::testing::WithParamInterface<SadMxNx4Param> {
class SADx4Test : public ::testing::WithParamInterface<SadMxNx4Param>,
public SADTestBase {
public:
SADx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
......@@ -257,8 +257,8 @@ class SADx4Test : public SADTestBase,
}
};
class SADTest : public SADTestBase,
public ::testing::WithParamInterface<SadMxNParam> {
class SADTest : public ::testing::WithParamInterface<SadMxNParam>,
public SADTestBase {
public:
SADTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
......@@ -288,8 +288,8 @@ class SADTest : public SADTestBase,
}
};
class SADavgTest : public SADTestBase,
public ::testing::WithParamInterface<SadMxNAvgParam> {
class SADavgTest : public ::testing::WithParamInterface<SadMxNAvgParam>,
public SADTestBase {
public:
SADavgTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
......
......@@ -25,8 +25,8 @@ const int kTileRows = 2;
typedef std::tr1::tuple<libaom_test::TestMode, int, int> SuperframeTestParam;
class SuperframeTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWithParam<SuperframeTestParam> {
: public ::libaom_test::CodecTestWithParam<SuperframeTestParam>,
public ::libaom_test::EncoderTest {
protected:
SuperframeTest()
: EncoderTest(GET_PARAM(0)), modified_buf_(NULL), last_sf_pts_(0) {}
......
......@@ -22,8 +22,8 @@
namespace {
class TileIndependenceTest
: public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith2Params<int, int> {
: public ::libaom_test::CodecTestWith2Params<int, int>,
public ::libaom_test::EncoderTest {
protected:
TileIndependenceTest()
: 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