Build and run futures tests on OSX
authorHans Fugal <fugalh@fb.com>
Thu, 11 Jun 2015 20:35:40 +0000 (13:35 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 11 Jun 2015 21:50:32 +0000 (14:50 -0700)
Summary: They don't pass, but they build!

Reviewed By: @jsedgwick

Differential Revision: D2141717

folly/futures/test/FutureTest.cpp
folly/test/Makefile.am

index ec5cb5a188a3581df2b57451810fb860e69d543b..723b358e7052bc64d1c9192b0b990d555a63fa59 100644 (file)
@@ -25,6 +25,7 @@
 #include <algorithm>
 #include <atomic>
 #include <memory>
+#include <numeric>
 #include <string>
 #include <thread>
 #include <type_traits>
@@ -648,7 +649,7 @@ TEST(Future, CircularDependencySharedPtrSelfReset) {
 
   ptr.reset();
 
-  promise.setWith([]{return 1l;});
+  promise.setValue(1);
 }
 
 TEST(Future, Constructor) {
index 51f61acd2756831b36bc0bf75018e14de37a1d37..bbe732e1809e85c48e9226721beda18a9fa29a57 100644 (file)
@@ -182,4 +182,34 @@ spooky_hash_v2_test_SOURCES = SpookyHashV2Test.cpp
 spooky_hash_v2_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la $(top_builddir)/libfollybenchmark.la
 TESTS += spooky_hash_v2_test
 
+futures_test_SOURCES = \
+    ../futures/test/CollectTest.cpp \
+    ../futures/test/ContextTest.cpp \
+    ../futures/test/CoreTest.cpp \
+    ../futures/test/EnsureTest.cpp \
+    ../futures/test/ExecutorTest.cpp \
+    ../futures/test/FSMTest.cpp \
+    ../futures/test/FilterTest.cpp \
+    ../futures/test/FutureTest.cpp \
+    ../futures/test/HeaderCompileTest.cpp \
+    ../futures/test/InterruptTest.cpp \
+    ../futures/test/MapTest.cpp \
+    ../futures/test/PollTest.cpp \
+    ../futures/test/PromiseTest.cpp \
+    ../futures/test/ReduceTest.cpp \
+    ../futures/test/SharedPromiseTest.cpp \
+    ../futures/test/ThenCompileTest.cpp \
+    ../futures/test/ThenTest.cpp \
+    ../futures/test/TimekeeperTest.cpp \
+    ../futures/test/TryTest.cpp \
+    ../futures/test/UnitTest.cpp \
+    ../futures/test/UnwrapTest.cpp \
+    ../futures/test/ViaTest.cpp \
+    ../futures/test/WaitTest.cpp \
+    ../futures/test/WillEqualTest.cpp \
+    ../futures/test/WindowTest.cpp
+
+futures_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
+TESTS += futures_test
+
 check_PROGRAMS += $(TESTS)