Merge "Be More Forgiving in EXPECT_ALMOST()" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3efe87583d
@@ -59,6 +59,7 @@ const int kShortSleep = 1 * kSpeedMultiplier;
|
|||||||
const int kLongSleep = 2 * kSpeedMultiplier;
|
const int kLongSleep = 2 * kSpeedMultiplier;
|
||||||
const uint32_t kDuration = 2 * kSpeedMultiplier;
|
const uint32_t kDuration = 2 * kSpeedMultiplier;
|
||||||
const uint32_t kLongDuration = 5 * kSpeedMultiplier;
|
const uint32_t kLongDuration = 5 * kSpeedMultiplier;
|
||||||
|
const uint32_t kAlmostRange = 3 * kSpeedMultiplier;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace wvoec {
|
namespace wvoec {
|
||||||
@@ -736,9 +737,9 @@ static void dump_openssl_error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We don't expect exact timing.
|
// We don't expect exact timing.
|
||||||
#define EXPECT_ALMOST(A, B) \
|
#define EXPECT_ALMOST(A, B) \
|
||||||
EXPECT_GE(A + kSpeedMultiplier, B); \
|
EXPECT_GE(A + kAlmostRange, B); \
|
||||||
EXPECT_LE(A - kSpeedMultiplier, B);
|
EXPECT_LE(A - kAlmostRange, B);
|
||||||
|
|
||||||
class Session {
|
class Session {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user