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
This commit is contained in:
@@ -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<MyExperiment>();
|
||||
@@ -68,7 +71,7 @@ struct SqrCost : Algo1_CostFunction {
|
||||
}
|
||||
};
|
||||
|
||||
TEST(Config, SupportsPolimorphism) {
|
||||
TEST(Config, SupportsPolymorphism) {
|
||||
Config config;
|
||||
config.Set<Algo1_CostFunction>(new SqrCost());
|
||||
EXPECT_EQ(25, config.Get<Algo1_CostFunction>().cost(5));
|
||||
|
||||
Reference in New Issue
Block a user