| Index: media/base/vector_math_unittest.cc
|
| diff --git a/media/base/vector_math_unittest.cc b/media/base/vector_math_unittest.cc
|
| index bed609098b8a2bced06604402f7caa8341caac9b..95433ca475ed0b5b03b7db52016fc1519c8ac046 100644
|
| --- a/media/base/vector_math_unittest.cc
|
| +++ b/media/base/vector_math_unittest.cc
|
| @@ -44,12 +44,12 @@ class VectorMathTest : public testing::Test {
|
|
|
| void VerifyOutput(float value) {
|
| for (int i = 0; i < kVectorSize; ++i)
|
| - ASSERT_FLOAT_EQ(output_vector_.get()[i], value);
|
| + ASSERT_FLOAT_EQ(output_vector_[i], value);
|
| }
|
|
|
| protected:
|
| - scoped_ptr<float, base::AlignedFreeDeleter> input_vector_;
|
| - scoped_ptr<float, base::AlignedFreeDeleter> output_vector_;
|
| + scoped_ptr<float[], base::AlignedFreeDeleter> input_vector_;
|
| + scoped_ptr<float[], base::AlignedFreeDeleter> output_vector_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(VectorMathTest);
|
| };
|
| @@ -138,7 +138,15 @@ TEST_F(VectorMathTest, FMUL) {
|
| #endif
|
| }
|
|
|
| -namespace {
|
| +TEST_F(VectorMathTest, Crossfade) {
|
| + FillTestVectors(0, 1);
|
| + vector_math::Crossfade(
|
| + input_vector_.get(), kVectorSize, output_vector_.get());
|
| + for (int i = 0; i < kVectorSize; ++i) {
|
| + ASSERT_FLOAT_EQ(i / static_cast<float>(kVectorSize), output_vector_[i])
|
| + << "i=" << i;
|
| + }
|
| +}
|
|
|
| class EWMATestScenario {
|
| public:
|
| @@ -248,8 +256,6 @@ class EWMATestScenario {
|
| float expected_max_;
|
| };
|
|
|
| -} // namespace
|
| -
|
| typedef testing::TestWithParam<EWMATestScenario> VectorMathEWMAAndMaxPowerTest;
|
|
|
| TEST_P(VectorMathEWMAAndMaxPowerTest, Correctness) {
|
|
|