summaryrefslogtreecommitdiff
path: root/test/datarate_test.cc
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2013-01-18 11:51:12 -0800
committerJohn Koleszar <jkoleszar@google.com>2013-01-23 14:41:33 -0800
commit706cafe336f43934c3824734f95cffec8e45151b (patch)
tree44b23ee44e54278a9592d586fd3965f64b741ae2 /test/datarate_test.cc
parentbed59eb8de198ca9ab1230011e5a6d54d1c9765e (diff)
downloadlibvpx-706cafe336f43934c3824734f95cffec8e45151b.tar
libvpx-706cafe336f43934c3824734f95cffec8e45151b.tar.gz
libvpx-706cafe336f43934c3824734f95cffec8e45151b.tar.bz2
libvpx-706cafe336f43934c3824734f95cffec8e45151b.zip
Support multiple codecs in test infrastructure
This commit starts to convert the tests to a system where the codec to be used is provided by a factory object. Currently no tests are instantiated for VP9 since they all fail for various reasons, but it was verified that they're called and the correct codec is instantiated. Change-Id: Ia7506df2ca3a7651218ba3ca560634f08c9fbdeb
Diffstat (limited to 'test/datarate_test.cc')
-rw-r--r--test/datarate_test.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/datarate_test.cc b/test/datarate_test.cc
index 6fbcb643d..85eeafbcc 100644
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -7,17 +7,23 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "third_party/googletest/src/include/gtest/gtest.h"
+#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
-#include "third_party/googletest/src/include/gtest/gtest.h"
+#include "test/util.h"
+
namespace {
class DatarateTest : public ::libvpx_test::EncoderTest,
- public ::testing::TestWithParam<enum libvpx_test::TestMode> {
+ public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
+ public:
+ DatarateTest() : EncoderTest(GET_PARAM(0)) {}
+
protected:
virtual void SetUp() {
InitializeConfig();
- SetMode(GetParam());
+ SetMode(GET_PARAM(1));
ResetModel();
}
@@ -174,5 +180,6 @@ TEST_P(DatarateTest, ChangingDropFrameThresh) {
}
}
-INSTANTIATE_TEST_CASE_P(AllModes, DatarateTest, ALL_TEST_MODES);
+VP8_INSTANTIATE_TEST_CASE(DatarateTest, ALL_TEST_MODES);
+
} // namespace