X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FHasMemberFnTraitsTest.cpp;h=12d5ee26a33ebc1d6fcccd47f98ea44383a46fc0;hb=cd1bdc912603c0358ba733d379a74ae90ab3a437;hp=7944b4d473916387cfe45d12e2904ef259b5212c;hpb=ce64f0f685111ac24c7a321ea56d0c3524621df1;p=folly.git diff --git a/folly/test/HasMemberFnTraitsTest.cpp b/folly/test/HasMemberFnTraitsTest.cpp index 7944b4d4..12d5ee26 100644 --- a/folly/test/HasMemberFnTraitsTest.cpp +++ b/folly/test/HasMemberFnTraitsTest.cpp @@ -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 -#include +#include + #include #include @@ -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::value))); EXPECT_TRUE(LOG_VALUE((has_test::value))); - EXPECT_TRUE(LOG_VALUE((has_test::value))); - EXPECT_TRUE(LOG_VALUE((has_test::value))); - EXPECT_TRUE(LOG_VALUE((has_test::value))); + EXPECT_TRUE(LOG_VALUE((has_test::value))); + EXPECT_TRUE(LOG_VALUE(( + has_test::value))); + EXPECT_TRUE(LOG_VALUE(( + has_test::value))); EXPECT_TRUE(LOG_VALUE((has_test::value))); EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); EXPECT_FALSE(LOG_VALUE((has_test::value))); EXPECT_TRUE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); EXPECT_FALSE(LOG_VALUE((has_test::value))); EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_TRUE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); + EXPECT_TRUE(LOG_VALUE(( + has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); EXPECT_FALSE(LOG_VALUE((has_test::value))); EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_FALSE(LOG_VALUE((has_test::value))); - EXPECT_TRUE(LOG_VALUE((has_test::value))); - EXPECT_TRUE(LOG_VALUE((has_test::value))); + EXPECT_FALSE(LOG_VALUE(( + has_test::value))); + EXPECT_TRUE(LOG_VALUE(( + has_test::value))); + EXPECT_TRUE(LOG_VALUE(( + has_test::value))); } int main(int argc, char *argv[]) {