summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2015-02-13 18:48:45 -0800
committerJames Zern <jzern@google.com>2015-02-13 18:52:25 -0800
commit5b9dacd297c29262f81900972eeb2ae1ae64d1c5 (patch)
treea7b4839e71294fa42e77f8efade6b7271c1de251 /test
parentc5718a7aa3b5490fbfbc47d6f82e7cb3eed46a1e (diff)
downloadlibvpx-5b9dacd297c29262f81900972eeb2ae1ae64d1c5.tar
libvpx-5b9dacd297c29262f81900972eeb2ae1ae64d1c5.tar.gz
libvpx-5b9dacd297c29262f81900972eeb2ae1ae64d1c5.tar.bz2
libvpx-5b9dacd297c29262f81900972eeb2ae1ae64d1c5.zip
test_vector_test: fix build with --disable-(vp8|vp9)
use VP[89]_INSTANTIATE_TEST_CASE case when possible to disable the tests if the codec is unavailable. broken since: be6aead Try again to merge branch 'frame-parallel' into master branch. Change-Id: I8d81c5ba3b951f82be94bfaed6be194e4289baec
Diffstat (limited to 'test')
-rw-r--r--test/test_vector_test.cc36
1 files changed, 16 insertions, 20 deletions
diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc
index d7b1a544b..fa264f20a 100644
--- a/test/test_vector_test.cc
+++ b/test/test_vector_test.cc
@@ -135,32 +135,27 @@ TEST_P(TestVectorTest, MD5Match) {
// Test VP8 decode in serial mode with single thread.
// NOTE: VP8 only support serial mode.
-INSTANTIATE_TEST_CASE_P(
- VP8, TestVectorTest,
+VP8_INSTANTIATE_TEST_CASE(
+ TestVectorTest,
::testing::Combine(
- ::testing::Values(
- static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP8)),
- ::testing::Combine(
- ::testing::Values(0), // Serial Mode.
- ::testing::Values(1), // Single thread.
- ::testing::ValuesIn(libvpx_test::kVP8TestVectors,
- libvpx_test::kVP8TestVectors +
- libvpx_test::kNumVP8TestVectors))));
+ ::testing::Values(0), // Serial Mode.
+ ::testing::Values(1), // Single thread.
+ ::testing::ValuesIn(libvpx_test::kVP8TestVectors,
+ libvpx_test::kVP8TestVectors +
+ libvpx_test::kNumVP8TestVectors)));
// Test VP9 decode in serial mode with single thread.
-INSTANTIATE_TEST_CASE_P(
- VP9, TestVectorTest,
+VP9_INSTANTIATE_TEST_CASE(
+ TestVectorTest,
::testing::Combine(
- ::testing::Values(
- static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP9)),
- ::testing::Combine(
- ::testing::Values(0), // Serial Mode.
- ::testing::Values(1), // Single thread.
- ::testing::ValuesIn(libvpx_test::kVP9TestVectors,
- libvpx_test::kVP9TestVectors +
- libvpx_test::kNumVP9TestVectors))));
+ ::testing::Values(0), // Serial Mode.
+ ::testing::Values(1), // Single thread.
+ ::testing::ValuesIn(libvpx_test::kVP9TestVectors,
+ libvpx_test::kVP9TestVectors +
+ libvpx_test::kNumVP9TestVectors)));
+#if CONFIG_VP9_DECODER
// Test VP9 decode in frame parallel mode with different number of threads.
INSTANTIATE_TEST_CASE_P(
VP9MultiThreadedFrameParallel, TestVectorTest,
@@ -173,4 +168,5 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(libvpx_test::kVP9TestVectors,
libvpx_test::kVP9TestVectors +
libvpx_test::kNumVP9TestVectors))));
+#endif
} // namespace