From: Christopher Dykes Date: Sat, 2 Jul 2016 04:32:07 +0000 (-0700) Subject: Don't do #if in the middle of a parameter to a preprocessor macro X-Git-Tag: 2016.07.26~83 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2604541aa15d8f739ed65546abaa821b97fa34e2;p=folly.git Don't do #if in the middle of a parameter to a preprocessor macro Summary: Because MSVC doesn't let you do this. Separate the tests out and disable the entire thing instead. Reviewed By: yfeldblum Differential Revision: D3513174 fbshipit-source-id: 7411418204083f172883ca96eff3785c912a9647 --- diff --git a/folly/io/async/test/AsyncSSLSocketTest.cpp b/folly/io/async/test/AsyncSSLSocketTest.cpp index fd2b2521..27805c7b 100644 --- a/folly/io/async/test/AsyncSSLSocketTest.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest.cpp @@ -485,6 +485,10 @@ class NextProtocolTest : public testing::TestWithParam { std::unique_ptr server; }; +class NextProtocolTLSExtTest : public NextProtocolTest { + // For extended TLS protos +}; + class NextProtocolNPNOnlyTest : public NextProtocolTest { // For mismatching protos }; @@ -609,7 +613,18 @@ INSTANTIATE_TEST_CASE_P( NextProtocolTypePair( SSLContext::NextProtocolType::NPN, SSLContext::NextProtocolType::NPN), + NextProtocolTypePair( + SSLContext::NextProtocolType::NPN, + SSLContext::NextProtocolType::ANY), + NextProtocolTypePair( + SSLContext::NextProtocolType::ANY, + SSLContext::NextProtocolType::ANY))); + #if OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT) +INSTANTIATE_TEST_CASE_P( + AsyncSSLSocketTest, + NextProtocolTLSExtTest, + ::testing::Values( NextProtocolTypePair( SSLContext::NextProtocolType::ALPN, SSLContext::NextProtocolType::ALPN), @@ -618,14 +633,8 @@ INSTANTIATE_TEST_CASE_P( SSLContext::NextProtocolType::ANY), NextProtocolTypePair( SSLContext::NextProtocolType::ANY, - SSLContext::NextProtocolType::ALPN), + SSLContext::NextProtocolType::ALPN))); #endif - NextProtocolTypePair( - SSLContext::NextProtocolType::NPN, - SSLContext::NextProtocolType::ANY), - NextProtocolTypePair( - SSLContext::NextProtocolType::ANY, - SSLContext::NextProtocolType::ANY))); INSTANTIATE_TEST_CASE_P( AsyncSSLSocketTest,