Disable an assertion death test when using MSVC's assert()

MSVC's debug runtime prints assertion failures in wide characters, which
gtest doesn't understand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184544 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp b/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
index 8206d00..c941672 100644
--- a/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
+++ b/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
@@ -103,7 +103,7 @@
   EXPECT_EQ("Nothing", Value.getTypeAsString());
 }
 
-TEST(GeneicValueTest, Matcher) {
+TEST(GenericValueTest, Matcher) {
   EXPECT_TRUE(matches("class X {};", VariantValue(recordDecl(hasName("X")))
                                          .getTypedMatcher<Decl>()));
   EXPECT_TRUE(
@@ -112,8 +112,10 @@
                       VariantValue(functionDecl()).getTypedMatcher<Decl>()));
   // Can't get the wrong matcher.
   EXPECT_FALSE(VariantValue(varDecl()).hasTypedMatcher<Stmt>());
-#if GTEST_HAS_DEATH_TEST and DEBUG
-  // Trying to get the wrong matcher fails an assertion in Matcher<T>.
+#if !defined(NDEBUG) && GTEST_HAS_DEATH_TEST && !defined(_MSC_VER)
+  // Trying to get the wrong matcher fails an assertion in Matcher<T>.  We don't
+  // do this test when building with MSVC because its debug C runtime prints the
+  // assertion failure message as a wide string, which gtest doesn't understand.
   EXPECT_DEATH(VariantValue(varDecl()).getTypedMatcher<Stmt>(),
                "canConstructFrom");
 #endif