suppress warnings in tests for deprecated functions
[folly.git] / folly / futures / test / PromiseTest.cpp
index a48e8a00b72d1807a3690a0e334df9a19792ad19..858f9533bf63cf5058279051d7575ba0953c08fd 100644 (file)
@@ -141,7 +141,12 @@ TEST(Promise, setException) {
   {
     Promise<Unit> p;
     auto f = p.getFuture();
+    // Calling setException() with an exception_ptr is deprecated,
+    // but don't complain about this in the test for this function.
+    FOLLY_PUSH_WARNING
+    FOLLY_GCC_DISABLE_WARNING("-Wdeprecated-declarations")
     p.setException(std::make_exception_ptr(eggs));
+    FOLLY_POP_WARNING
     EXPECT_THROW(f.value(), eggs_t);
   }
   {