folly: build with -Wunused-parameter
[folly.git] / folly / futures / test / CollectTest.cpp
index 5834f22851c5914b7305c619600addbf0624f857..c58b41ff2f285a92b7b7e00f8c123accca210a85 100644 (file)
@@ -616,7 +616,6 @@ TEST(Collect, collectVariadicWithException) {
   Promise<int> pi;
   Future<bool> fb = pb.getFuture();
   Future<int> fi = pi.getFuture();
-  bool flag = false;
   auto f = collect(std::move(fb), std::move(fi));
   pb.setValue(true);
   EXPECT_FALSE(f.isReady());
@@ -631,3 +630,14 @@ TEST(Collect, collectAllNone) {
   auto f = collectAll(fs);
   EXPECT_TRUE(f.isReady());
 }
+
+TEST(Collect, noDefaultConstructor) {
+  struct A {
+    explicit A(size_t /* x */) {}
+  };
+
+  auto f1 = makeFuture(A(1));
+  auto f2 = makeFuture(A(2));
+
+  auto f = collect(std::move(f1), std::move(f2));
+}