folly/test/ExceptionWrapperTest.cpp: avoid shadowing warnings
[folly.git] / folly / test / MemoryTest.cpp
index afeeac2e046f1d0473cb17a37783a5832d34e85c..d7660476a085f2be7dbb0525c533b92c21bc6806 100644 (file)
@@ -17,9 +17,9 @@
 #include <folly/Memory.h>
 #include <folly/Arena.h>
 #include <folly/String.h>
+#include <folly/portability/GTest.h>
 
 #include <glog/logging.h>
-#include <gtest/gtest.h>
 
 #include <type_traits>
 
@@ -33,6 +33,11 @@ TEST(make_unique, compatible_with_std_make_unique) {
   make_unique<string>("hello, world");
 }
 
+TEST(allocate_sys_buffer, compiles) {
+  auto buf = allocate_sys_buffer(256);
+  //  Freed at the end of the scope.
+}
+
 template <std::size_t> struct T {};
 template <std::size_t> struct S {};
 template <std::size_t> struct P {};
@@ -93,11 +98,3 @@ TEST(rebind_allocator, sanity_check) {
   s.reset();
   ASSERT_EQ(nullptr, s.get());
 }
-
-int main(int argc, char **argv) {
-  FLAGS_logtostderr = true;
-  google::InitGoogleLogging(argv[0]);
-  testing::InitGoogleTest(&argc, argv);
-
-  return RUN_ALL_TESTS();
-}