Fix conditional compilation of tests using glob expressions.
authorAndreas Schuh <andreas.schuh.84@gmail.com>
Wed, 19 Mar 2014 15:55:43 +0000 (15:55 +0000)
committerAndreas Schuh <andreas.schuh.84@gmail.com>
Wed, 19 Mar 2014 15:55:43 +0000 (15:55 +0000)
test/gflags_unittest.cc

index 8277544..7a44f64 100644 (file)
@@ -408,7 +408,7 @@ TEST(FlagFileTest, FilenamesOurfileFirst) {
       -1.0);
 }
 
-#if HAVE_FNMATCH_H  // otherwise glob isn't supported
+#if defined(HAVE_FNMATCH_H) || (defined(_MSC_VER) && defined(HAVE_SHLWAPI_H))  // otherwise glob isn't supported
 TEST(FlagFileTest, FilenamesOurfileGlob) {
   FLAGS_test_string = "initial";
   FLAGS_test_bool = false;
@@ -460,7 +460,7 @@ TEST(FlagFileTest, FilenamesOurfileInBigList) {
       1,
       -1.0);
 }
-#endif  // ifdef HAVE_FNMATCH_H
+#endif  // defined(HAVE_FNMATCH_H) || (defined(_MSC_VER) && defined(HAVE_SHLWAPI_H))
 
 // Tests that a failed flag-from-string read keeps flags at default values
 TEST(FlagFileTest, FailReadFlagsFromString) {