From 45c9e441b90b8673476362e36c653810d6d91385 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 21 Nov 2016 15:39:27 -0800 Subject: [PATCH] Disable the DoubleRegistrationLogging singleton test under MSVC Summary: It's the only test in the file that is dependent on Subprocess, which is currently unsupported under MSVC. Reviewed By: yfeldblum Differential Revision: D4214812 fbshipit-source-id: 9dcd9763b51d037e0c452f79f134df286a11e718 --- folly/test/SingletonTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/folly/test/SingletonTest.cpp b/folly/test/SingletonTest.cpp index fe579484..36eb9f6b 100644 --- a/folly/test/SingletonTest.cpp +++ b/folly/test/SingletonTest.cpp @@ -17,13 +17,16 @@ #include #include -#include #include #include #include #include #include +#ifndef _MSC_VER +#include +#endif + #include #include @@ -594,6 +597,8 @@ TEST(Singleton, MockTest) { vault.destroyInstances(); } +#ifndef _MSC_VER +// Subprocess isn't currently supported under MSVC. TEST(Singleton, DoubleRegistrationLogging) { const auto basename = "singleton_double_registration"; const auto sub = fs::executable_path().remove_filename() / basename; @@ -610,6 +615,7 @@ TEST(Singleton, DoubleRegistrationLogging) { EXPECT_EQ(SIGABRT, res.killSignal()); EXPECT_THAT(err, testing::StartsWith("Double registration of singletons")); } +#endif // Singleton using a non default constructor test/example: struct X { -- 2.34.1