Create first pdfium embedder test.
[pdfium.git] / BUILD.gn
index a442e79..d9413fd 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//testing/test.gni")
+
 pdf_use_skia = false
 
 config("pdfium_config") {
@@ -792,15 +794,18 @@ static_library("formfiller") {
   configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ]
 }
 
-executable("pdfium_unittests") {
-  testonly = true
+test("pdfium_unittests") {
   sources = [
     "core/src/fxcrt/fx_basic_bstring_unittest.cpp",
+    "testing/fx_string_testhelpers.cpp",
+    "testing/fx_string_testhelpers.h",
   ]
   deps = [
-    ":pdfium",
-    "//base",
-    "//base/test:run_all_unittests",
     "//testing/gtest",
+    "//testing/gtest:gtest_main",
+    ":pdfium"
   ]
+  include_dirs = [ "." ]
+  configs -= [ "//build/config/compiler:chromium_code" ]
+  configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ]
 }