diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-19 14:03:31 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-19 14:03:31 -0700 |
commit | 6d34d056a7188b7ae9800fe3ceb68645e0442879 (patch) | |
tree | 44f6f20b8726dfaa76b55a625b8052fade57f486 /BUILD.gn | |
parent | aff4635dad81bc319266d9d84b81552580cd2b65 (diff) | |
download | pdfium-6d34d056a7188b7ae9800fe3ceb68645e0442879.tar.xz |
Consolidate test support code.
Removes duplication between pdfium_test and pdfium_embeddertest
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1416713002 .
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 39 |
1 files changed, 35 insertions, 4 deletions
@@ -133,6 +133,39 @@ static_library("pdfium") { } } +source_set("test_support") { + testonly = true + sources = [ + "testing/fx_string_testhelpers.cpp", + "testing/fx_string_testhelpers.h", + "testing/test_support.cpp", + "testing/test_support.h", + ] + deps = [ + "//testing/gmock", + "//testing/gtest", + ":pdfium", + ] + include_dirs = [ + "." + ] + if (pdf_enable_v8) { + deps += [ + "//v8", + "//v8:v8_libplatform", + ] + include_dirs += [ + "//v8", + "//v8/include", + ] + } + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] +} + # Targets below this are only visible within this file (and to the # top-level gn_visibility target used to help gn_all build everything). visibility = [ @@ -731,14 +764,13 @@ test("pdfium_unittests") { "core/src/fxcrt/fx_basic_wstring_unittest.cpp", "core/src/fxcrt/fx_bidi_unittest.cpp", "core/src/fxcrt/fx_system_unittest.cpp", - "testing/fx_string_testhelpers.cpp", - "testing/fx_string_testhelpers.h", "third_party/base/nonstd_unique_ptr_unittest.cpp", ] deps = [ "//testing/gtest", "//testing/gtest:gtest_main", ":pdfium", + ":test_support", ] include_dirs = [ "." ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -763,13 +795,12 @@ test("pdfium_embeddertests") { "testing/embedder_test.h", "testing/embedder_test_mock_delegate.h", "testing/embedder_test_timer_handling_delegate.h", - "testing/fx_string_testhelpers.cpp", - "testing/fx_string_testhelpers.h", ] deps = [ "//testing/gmock", "//testing/gtest", ":pdfium", + ":test_support", ] include_dirs = [ "." |