Fix copyright lines
[folly.git] / folly / test / HasMemberFnTraitsTest.cpp
index 7944b4d473916387cfe45d12e2904ef259b5212c..12d5ee26a33ebc1d6fcccd47f98ea44383a46fc0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2013-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.
@@ -20,7 +20,8 @@
 
 #include <folly/Traits.h>
 
-#include <gtest/gtest.h>
+#include <folly/portability/GTest.h>
+
 #include <glog/logging.h>
 
 #include <string>
@@ -45,8 +46,8 @@ struct Bar {
 struct Gaz {
   void test();
   void test() const;
-  void test() volatile;
-  void test() const volatile;
+  void test() /* nolint */ volatile;
+  void test() const /* nolint */ volatile;
 };
 
 struct NoCV {
@@ -58,11 +59,11 @@ struct Const {
 };
 
 struct Volatile {
-  void test() volatile;
+  void test() /* nolint */ volatile;
 };
 
 struct CV {
-  void test() const volatile;
+  void test() const /* nolint */ volatile;
 };
 
 bool log_value(const char* what, bool result) {
@@ -89,33 +90,47 @@ TEST(HasMemberFnTraits, DirectMembers) {
 
   EXPECT_TRUE(LOG_VALUE((has_test<Gaz, void()>::value)));
   EXPECT_TRUE(LOG_VALUE((has_test<Gaz, void() const>::value)));
-  EXPECT_TRUE(LOG_VALUE((has_test<Gaz, void() volatile>::value)));
-  EXPECT_TRUE(LOG_VALUE((has_test<Gaz, void() const volatile>::value)));
-  EXPECT_TRUE(LOG_VALUE((has_test<Gaz, void() volatile const>::value)));
+  EXPECT_TRUE(LOG_VALUE((has_test<Gaz, void() /* nolint */ volatile>::value)));
+  EXPECT_TRUE(LOG_VALUE((
+          has_test<Gaz, void() const /* nolint */ volatile>::value)));
+  EXPECT_TRUE(LOG_VALUE((
+          has_test<Gaz, void() /* nolint */ volatile const>::value)));
 
   EXPECT_TRUE(LOG_VALUE((has_test<NoCV, void()>::value)));
   EXPECT_FALSE(LOG_VALUE((has_test<NoCV, void() const>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<NoCV, void() volatile>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<NoCV, void() const volatile>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<NoCV, void() volatile const>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<NoCV, void() /* nolint */ volatile>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<NoCV, void() const /* nolint */ volatile>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<NoCV, void() /* nolint */ volatile const>::value)));
 
   EXPECT_FALSE(LOG_VALUE((has_test<Const, void()>::value)));
   EXPECT_TRUE(LOG_VALUE((has_test<Const, void() const>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<Const, void() volatile>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<Const, void() const volatile>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<Const, void() volatile const>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<Const, void() /* nolint */ volatile>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<Const, void() const /* nolint */ volatile>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<Const, void() /* nolint */ volatile const>::value)));
 
   EXPECT_FALSE(LOG_VALUE((has_test<Volatile, void()>::value)));
   EXPECT_FALSE(LOG_VALUE((has_test<Volatile, void() const>::value)));
-  EXPECT_TRUE(LOG_VALUE((has_test<Volatile, void() volatile>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<Volatile, void() const volatile>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<Volatile, void() volatile const>::value)));
+  EXPECT_TRUE(LOG_VALUE((
+          has_test<Volatile, void() /* nolint */ volatile>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<Volatile, void() const /* nolint */ volatile>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<Volatile, void() /* nolint */ volatile const>::value)));
 
   EXPECT_FALSE(LOG_VALUE((has_test<CV, void()>::value)));
   EXPECT_FALSE(LOG_VALUE((has_test<CV, void() const>::value)));
-  EXPECT_FALSE(LOG_VALUE((has_test<CV, void() volatile>::value)));
-  EXPECT_TRUE(LOG_VALUE((has_test<CV, void() const volatile>::value)));
-  EXPECT_TRUE(LOG_VALUE((has_test<CV, void() volatile const>::value)));
+  EXPECT_FALSE(LOG_VALUE((
+          has_test<CV, void() /* nolint */ volatile>::value)));
+  EXPECT_TRUE(LOG_VALUE((
+          has_test<CV, void() const /* nolint */ volatile>::value)));
+  EXPECT_TRUE(LOG_VALUE((
+          has_test<CV, void() /* nolint */ volatile const>::value)));
 }
 
 int main(int argc, char *argv[]) {