From 2de80ddc72ff59ee18ee0c9f383bcaea3fb3d7bc Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Thu, 27 Jun 2013 10:18:09 +0000 Subject: [PATCH] Fix unnamed-type-template-args warnings on clang. BUG= R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1732004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4271 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/common_unittest.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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));