summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Litt <joshualitt@google.com>2013-11-21 15:06:51 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-11-21 15:06:51 -0800
commit3aeebfb231b8ac446d6f72e37ab75de1d3bfa350 (patch)
treefb041ca6827191bf607f3fd7a59d29beee0b3ba6
parentfe847e7660507b74bdc66197ef68611cb8b79d8a (diff)
parent51490e5654263c3b47195929f9fcdad16f4fdff2 (diff)
downloadlibvpx-3aeebfb231b8ac446d6f72e37ab75de1d3bfa350.tar
libvpx-3aeebfb231b8ac446d6f72e37ab75de1d3bfa350.tar.gz
libvpx-3aeebfb231b8ac446d6f72e37ab75de1d3bfa350.tar.bz2
libvpx-3aeebfb231b8ac446d6f72e37ab75de1d3bfa350.zip
Merge "Removing PARAMS macro for consistency"
-rw-r--r--test/convolve_test.cc4
-rw-r--r--test/dct16x16_test.cc13
-rw-r--r--test/dct32x32_test.cc4
-rw-r--r--test/fdct4x4_test.cc7
-rw-r--r--test/fdct8x8_test.cc13
-rw-r--r--test/sixtap_predict_test.cc5
-rw-r--r--test/util.h1
7 files changed, 33 insertions, 14 deletions
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index abeb4bd50..9ab60b1c3 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -44,6 +44,8 @@ struct ConvolveFunctions {
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 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
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 b61df8d0d..5496d0b62 100644
--- a/test/dct16x16_test.cc
+++ b/test/dct16x16_test.cc
@@ -264,6 +264,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
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 @@ class Trans16x16TestBase {
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 @@ TEST_P(Trans16x16DCT, InvAccuracyCheck) {
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 1e792da8d..2df3b6fe9 100644
--- a/test/dct32x32_test.cc
+++ b/test/dct32x32_test.cc
@@ -77,7 +77,9 @@ void reference_32x32_dct_2d(const int16_t input[kNumCoeffs],
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 9d8b0bd3e..67426eb74 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -36,6 +36,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
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 Trans4x4TestBase {
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 @@ TEST_P(Trans4x4DCT, InvAccuracyCheck) {
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 3777b1151..19ffe26aa 100644
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -35,6 +35,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
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 @@ class FwdTrans8x8TestBase {
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 @@ TEST_P(FwdTrans8x8DCT, ExtremalCheck) {
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 ee4faac37..655146dbf 100644
--- a/test/sixtap_predict_test.cc
+++ b/test/sixtap_predict_test.cc
@@ -32,7 +32,10 @@ typedef void (*sixtap_predict_fn_t)(uint8_t *src_ptr,
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 4d7f3d41e..3c45721fa 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,