/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2015-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#include <gtest/gtest.h>
#include <folly/experimental/AutoTimer.h>
+#include <folly/portability/GTest.h>
+
using namespace folly;
using namespace std;
int StubClock::t = 0;
TEST(TestAutoTimer, HandleBasicClosure) {
- auto logger = [](StringPiece msg, auto sec) {
- return StubLogger()(msg, sec);
+ auto logger = [](StringPiece mesg, auto sec) {
+ return StubLogger()(mesg, sec);
};
StubClock::t = 1;
// Here decltype is needed. But since most users are expected to use this
auto t = makeAutoTimer(
"Third message on destruction",
std::chrono::duration<double>::zero(),
- [](StringPiece msg, auto sec) {
- GoogleLogger<GoogleLoggerStyle::PRETTY>()(msg, sec);
+ [](StringPiece mesg, auto sec) {
+ GoogleLogger<GoogleLoggerStyle::PRETTY>()(mesg, sec);
});
t.log("First message");
t.log("Second message");