dummy results in stl_vector_test on gcc 4.6
authorNicholas Ormrod <njormrod@fb.com>
Fri, 7 Dec 2012 22:34:19 +0000 (14:34 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:49:30 +0000 (14:49 -0800)
Summary:
The test doesn't run when GCC < 4.7, however our test framework
needs some output anyways. I've added a placeholder test that does
nothing, but does cause something to be printed.

Test Plan: run fbmake runtests on folly/test/stl_tests/

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D652161

folly/test/stl_tests/StlVectorTest.cpp

index f2376a8e5af514bacb78f330410100c925d863ea..9250307d4ee45a0d1753fdfa4db501090b8a763d 100644 (file)
@@ -2732,8 +2732,17 @@ int main(int argc, char** argv) {
 
 #else // GCC 4.7 guard
 
+#include <gflags/gflags.h>
+#include <gtest/gtest.h>
+
+// do nothing
+TEST(placeholder, gccversion) {}
+
 int main(int argc, char** argv) {
-  return 0;
+  testing::InitGoogleTest(&argc, argv);
+  google::ParseCommandLineFlags(&argc, &argv, true);
+
+  return RUN_ALL_TESTS();
 }
 
 #endif // GCC 4.7 guard