summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-06-01 15:28:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-01 15:28:54 +0000
commitd60d7cb936ea50a0dfab26372f3a8958f84250e7 (patch)
tree94a17b83ba7f2e6ff5715f15727e01d3a95e4cd9 /testing
parent4f21d77576b371270375f1120cba5cf99c248e9d (diff)
downloadpdfium-d60d7cb936ea50a0dfab26372f3a8958f84250e7.tar.xz
Fix XFA guards
These guards are using #if, when they should be using #ifdef. Caught using Clang's static analyzer. Change-Id: I86e99c5e4142cf84fff5f2365ad534f09ae40511 Reviewed-on: https://pdfium-review.googlesource.com/33510 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r--testing/test_support.h4
-rw-r--r--testing/unit_test_main.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/testing/test_support.h b/testing/test_support.h
index f26e161544..56b2f113b3 100644
--- a/testing/test_support.h
+++ b/testing/test_support.h
@@ -13,7 +13,7 @@
#include "public/fpdfview.h"
-#if PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA
#include "xfa/fgas/font/cfgas_fontmgr.h"
#endif // PDF_ENABLE_XFA
@@ -118,7 +118,7 @@ class TestLoader {
const size_t m_Len;
};
-#if PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA
CFGAS_FontMgr* GetGlobalFontManager();
#endif // PDF_ENABLE_XFA
diff --git a/testing/unit_test_main.cpp b/testing/unit_test_main.cpp
index 92dceefdb6..70eb51a3a1 100644
--- a/testing/unit_test_main.cpp
+++ b/testing/unit_test_main.cpp
@@ -15,7 +15,7 @@
#include "v8/include/v8.h"
#endif // PDF_ENABLE_V8
-#if PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA
#include "core/fxge/cfx_fontmgr.h"
#include "core/fxge/cfx_gemodule.h"
#include "xfa/fgas/font/cfgas_fontmgr.h"
@@ -74,7 +74,7 @@ int main(int argc, char** argv) {
#endif // V8_USE_EXTERNAL_STARTUP_DATA
#endif // PDF_ENABLE_V8
-#if PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA
env_ = new Environment();
// The env will be deleted by gtest.
AddGlobalTestEnvironment(env_);