diff --git a/webrtc/common_unittest.cc b/webrtc/common_unittest.cc index e672f1da47..082c18c2c7 100644 --- a/webrtc/common_unittest.cc +++ b/webrtc/common_unittest.cc @@ -7,16 +7,16 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include "common.h" // NOLINT +#include "webrtc/common.h" -#include "gtest/gtest.h" +#include "testing/gtest/include/gtest/gtest.h" namespace webrtc { namespace { struct MyExperiment { - enum { kDefaultFactor = 1 }; - enum { kDefaultOffset = 2 }; + static const int kDefaultFactor; + static const int kDefaultOffset; MyExperiment() : factor(kDefaultFactor), offset(kDefaultOffset) {} @@ -28,6 +28,9 @@ struct MyExperiment { int offset; }; +const int MyExperiment::kDefaultFactor = 1; +const int MyExperiment::kDefaultOffset = 2; + TEST(Config, ReturnsDefaultInstanceIfNotConfigured) { Config config; const MyExperiment& my_exp = config.Get(); @@ -68,7 +71,7 @@ struct SqrCost : Algo1_CostFunction { } }; -TEST(Config, SupportsPolimorphism) { +TEST(Config, SupportsPolymorphism) { Config config; config.Set(new SqrCost()); EXPECT_EQ(25, config.Get().cost(5));