X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Ftest%2FIndexedMemPoolTest.cpp;h=1cfa69071b71b6d0aaac6f0b7276e28715494ed1;hp=606d9565abbb3ac16f34086c5def6020cf93ddf1;hb=43d3a315bbd54cb187021897b566ffb53290a44b;hpb=321542683a01c3f334047531e9b487f047129775 diff --git a/folly/test/IndexedMemPoolTest.cpp b/folly/test/IndexedMemPoolTest.cpp index 606d9565..1cfa6907 100644 --- a/folly/test/IndexedMemPoolTest.cpp +++ b/folly/test/IndexedMemPoolTest.cpp @@ -16,12 +16,12 @@ #include #include +#include +#include + #include #include -#include #include -#include -#include using namespace folly; using namespace folly::test; @@ -157,7 +157,7 @@ TEST(IndexedMemPool, locate_elem) { } struct NonTrivialStruct { - static __thread int count; + static FOLLY_TLS int count; int elem_; @@ -176,7 +176,7 @@ struct NonTrivialStruct { } }; -__thread int NonTrivialStruct::count; +FOLLY_TLS int NonTrivialStruct::count; TEST(IndexedMemPool, eager_recycle) { typedef IndexedMemPool Pool; @@ -216,9 +216,3 @@ TEST(IndexedMemPool, late_recycle) { } EXPECT_EQ(NonTrivialStruct::count, 0); } - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); - return RUN_ALL_TESTS(); -}