diff options
Diffstat (limited to 'test/subtract_test.cc')
-rw-r--r-- | test/subtract_test.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/subtract_test.cc b/test/subtract_test.cc index 60acf818e..d1f272972 100644 --- a/test/subtract_test.cc +++ b/test/subtract_test.cc @@ -10,10 +10,11 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/acm_random.h" +#include "test/clear_system_state.h" #include "test/register_state_check.h" extern "C" { -#include "vpx_config.h" -#include "vpx_rtcd.h" +#include "./vpx_config.h" +#include "./vp8_rtcd.h" #include "vp8/common/blockd.h" #include "vp8/encoder/block.h" #include "vpx_mem/vpx_mem.h" @@ -23,7 +24,12 @@ typedef void (*subtract_b_fn_t)(BLOCK *be, BLOCKD *bd, int pitch); namespace { -class SubtractBlockTest : public ::testing::TestWithParam<subtract_b_fn_t> {}; +class SubtractBlockTest : public ::testing::TestWithParam<subtract_b_fn_t> { + public: + virtual void TearDown() { + libvpx_test::ClearSystemState(); + } +}; using libvpx_test::ACMRandom; @@ -45,7 +51,7 @@ TEST_P(SubtractBlockTest, SimpleSubtract) { bd.predictor = reinterpret_cast<unsigned char*>( vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*bd.predictor))); - for(int i = 0; kSrcStride[i] > 0; ++i) { + for (int i = 0; kSrcStride[i] > 0; ++i) { // start at block0 be.src = 0; be.base_src = &source; @@ -55,7 +61,7 @@ TEST_P(SubtractBlockTest, SimpleSubtract) { int16_t *src_diff = be.src_diff; for (int r = 0; r < kBlockHeight; ++r) { for (int c = 0; c < kBlockWidth; ++c) { - src_diff[c] = 0xa5a5; + src_diff[c] = static_cast<int16_t>(0xa5a5); } src_diff += kDiffPredStride; } |