#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/moving_window.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
constexpr int kTestValues[] = …;
}
class MovingMaxTest : public testing::TestWithParam<unsigned int> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MovingMaxTest, BlanketTest) { … }
TEST(MovingMax, SingleElementWindow) { … }
TEST(MovingMax, VeryLargeWindow) { … }
TEST(MovingMax, Counts) { … }
TEST(MovingAverage, Unrounded) { … }
class MovingMinTest : public testing::TestWithParam<unsigned int> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MovingMinTest, BlanketTest) { … }
class MovingAverageTest : public testing::TestWithParam<unsigned int> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MovingAverageTest, BlanketTest) { … }
class MovingDeviationTest : public testing::TestWithParam<unsigned int> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MovingDeviationTest, BlanketTest) { … }
TEST(MovingWindowTest, Iteration) { … }
TEST(MovingMeanDeviation, WorksWithTimeDelta) { … }
}