Removing PARAMS macro for consistency
Change-Id: I23ed873a6c47b15491a2ffbcdd4f0fdeef1207a0
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index abeb4bd..9ab60b1 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -44,6 +44,8 @@
convolve_fn_t hv8_avg_;
};
+typedef std::tr1::tuple<int, int, const ConvolveFunctions*> convolve_param_t;
+
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
#define VP9_FILTER_WEIGHT 128
#define VP9_FILTER_SHIFT 7
@@ -169,7 +171,7 @@
output_width, output_height);
}
-class ConvolveTest : public PARAMS(int, int, const ConvolveFunctions*) {
+class ConvolveTest : public ::testing::TestWithParam<convolve_param_t> {
public:
static void SetUpTestCase() {
// Force input_ to be unaligned, output to be 16 byte aligned.
diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc
index b61df8d..5496d0b 100644
--- a/test/dct16x16_test.cc
+++ b/test/dct16x16_test.cc
@@ -264,6 +264,9 @@
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
int tx_type);
+typedef std::tr1::tuple<fdct_t, idct_t, int> dct_16x16_param_t;
+typedef std::tr1::tuple<fht_t, iht_t, int> ht_16x16_param_t;
+
void fdct16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
vp9_fdct16x16_c(in, out, stride);
}
@@ -412,8 +415,9 @@
fht_t fwd_txfm_ref;
};
-class Trans16x16DCT : public Trans16x16TestBase,
- public PARAMS(fdct_t, idct_t, int) {
+class Trans16x16DCT
+ : public Trans16x16TestBase,
+ public ::testing::TestWithParam<dct_16x16_param_t> {
public:
virtual ~Trans16x16DCT() {}
@@ -454,8 +458,9 @@
RunInvAccuracyCheck();
}
-class Trans16x16HT : public Trans16x16TestBase,
- public PARAMS(fht_t, iht_t, int) {
+class Trans16x16HT
+ : public Trans16x16TestBase,
+ public ::testing::TestWithParam<ht_16x16_param_t> {
public:
virtual ~Trans16x16HT() {}
diff --git a/test/dct32x32_test.cc b/test/dct32x32_test.cc
index 1e792da..2df3b6f 100644
--- a/test/dct32x32_test.cc
+++ b/test/dct32x32_test.cc
@@ -77,7 +77,9 @@
typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride);
typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride);
-class Trans32x32Test : public PARAMS(fwd_txfm_t, inv_txfm_t, int) {
+typedef std::tr1::tuple<fwd_txfm_t, inv_txfm_t, int> trans_32x32_param_t;
+
+class Trans32x32Test : public ::testing::TestWithParam<trans_32x32_param_t> {
public:
virtual ~Trans32x32Test() {}
virtual void SetUp() {
diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc
index 9d8b0bd..67426eb 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -36,6 +36,9 @@
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
int tx_type);
+typedef std::tr1::tuple<fdct_t, idct_t, int> dct_4x4_param_t;
+typedef std::tr1::tuple<fht_t, iht_t, int> ht_4x4_param_t;
+
void fdct4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
vp9_fdct4x4_c(in, out, stride);
}
@@ -183,7 +186,7 @@
class Trans4x4DCT
: public Trans4x4TestBase,
- public PARAMS(fdct_t, idct_t, int) {
+ public ::testing::TestWithParam<dct_4x4_param_t> {
public:
virtual ~Trans4x4DCT() {}
@@ -226,7 +229,7 @@
class Trans4x4HT
: public Trans4x4TestBase,
- public PARAMS(fht_t, iht_t, int) {
+ public ::testing::TestWithParam<ht_4x4_param_t> {
public:
virtual ~Trans4x4HT() {}
diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc
index 3777b11..19ffe26a 100644
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -35,6 +35,9 @@
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
int tx_type);
+typedef std::tr1::tuple<fdct_t, idct_t, int> dct_8x8_param_t;
+typedef std::tr1::tuple<fht_t, iht_t, int> ht_8x8_param_t;
+
void fdct8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
vp9_fdct8x8_c(in, out, stride);
}
@@ -215,8 +218,9 @@
fht_t fwd_txfm_ref;
};
-class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
- public PARAMS(fdct_t, idct_t, int) {
+class FwdTrans8x8DCT
+ : public FwdTrans8x8TestBase,
+ public ::testing::TestWithParam<dct_8x8_param_t> {
public:
virtual ~FwdTrans8x8DCT() {}
@@ -254,8 +258,9 @@
RunExtremalCheck();
}
-class FwdTrans8x8HT : public FwdTrans8x8TestBase,
- public PARAMS(fht_t, iht_t, int) {
+class FwdTrans8x8HT
+ : public FwdTrans8x8TestBase,
+ public ::testing::TestWithParam<ht_8x8_param_t> {
public:
virtual ~FwdTrans8x8HT() {}
diff --git a/test/sixtap_predict_test.cc b/test/sixtap_predict_test.cc
index ee4faac..655146d 100644
--- a/test/sixtap_predict_test.cc
+++ b/test/sixtap_predict_test.cc
@@ -32,7 +32,10 @@
uint8_t *dst_ptr,
int dst_pitch);
-class SixtapPredictTest : public PARAMS(int, int, sixtap_predict_fn_t) {
+typedef std::tr1::tuple<int, int, sixtap_predict_fn_t> sixtap_predict_param_t;
+
+class SixtapPredictTest
+ : public ::testing::TestWithParam<sixtap_predict_param_t> {
public:
static void SetUpTestCase() {
src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize));
diff --git a/test/util.h b/test/util.h
index 4d7f3d4..3c45721 100644
--- a/test/util.h
+++ b/test/util.h
@@ -17,7 +17,6 @@
#include "vpx/vpx_image.h"
// Macros
-#define PARAMS(...) ::testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
static double compute_psnr(const vpx_image_t *img1,