diff options
Diffstat (limited to 'test/boolcoder_test.cc')
-rw-r--r-- | test/boolcoder_test.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/test/boolcoder_test.cc b/test/boolcoder_test.cc index 41c2f7b9b..4e21be8c5 100644 --- a/test/boolcoder_test.cc +++ b/test/boolcoder_test.cc @@ -20,28 +20,16 @@ extern "C" { #include <string.h> #include <sys/types.h> +#include "test/acm_random.h" #include "third_party/googletest/src/include/gtest/gtest.h" #include "vpx/vpx_integer.h" namespace { const int num_tests = 10; - -class ACMRandom { - public: - explicit ACMRandom(int seed) { Reset(seed); } - - void Reset(int seed) { srand(seed); } - - uint8_t Rand8(void) { return (rand() >> 8) & 0xff; } - - int PseudoUniform(int range) { return (rand() >> 8) % range; } - - int operator()(int n) { return PseudoUniform(n); } - - static int DeterministicSeed(void) { return 0xbaba; } -}; } // namespace +using libvpx_test::ACMRandom; + TEST(VP8, TestBitIO) { ACMRandom rnd(ACMRandom::DeterministicSeed()); for (int n = 0; n < num_tests; ++n) { |