summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/edit/BUILD.gn15
-rw-r--r--core/fpdfapi/font/BUILD.gn12
-rw-r--r--core/fpdfapi/page/BUILD.gn15
-rw-r--r--core/fpdfapi/parser/BUILD.gn32
4 files changed, 74 insertions, 0 deletions
diff --git a/core/fpdfapi/edit/BUILD.gn b/core/fpdfapi/edit/BUILD.gn
index de1a404c87..6c88522590 100644
--- a/core/fpdfapi/edit/BUILD.gn
+++ b/core/fpdfapi/edit/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/jumbo.gni")
import("../../../pdfium.gni")
+import("../../../testing/test.gni")
jumbo_source_set("edit") {
sources = [
@@ -31,3 +32,17 @@ jumbo_source_set("edit") {
allow_circular_includes_from = [ "../parser" ]
visibility = [ "../../../*" ]
}
+
+pdfium_unittest_source_set("unittests") {
+ sources = [
+ "cpdf_pagecontentgenerator_unittest.cpp",
+ ]
+ deps = [
+ ":edit",
+ "../",
+ "../font",
+ "../page",
+ "../parser",
+ ]
+ pdfium_root_dir = "../../../"
+}
diff --git a/core/fpdfapi/font/BUILD.gn b/core/fpdfapi/font/BUILD.gn
index a8f8619124..a6f9705ada 100644
--- a/core/fpdfapi/font/BUILD.gn
+++ b/core/fpdfapi/font/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/jumbo.gni")
import("../../../pdfium.gni")
+import("../../../testing/test.gni")
jumbo_source_set("font") {
sources = [
@@ -54,3 +55,14 @@ jumbo_source_set("font") {
]
visibility = [ "../../../*" ]
}
+
+pdfium_unittest_source_set("unittests") {
+ sources = [
+ "cpdf_cmapparser_unittest.cpp",
+ "cpdf_tounicodemap_unittest.cpp",
+ ]
+ deps = [
+ ":font",
+ ]
+ pdfium_root_dir = "../../../"
+}
diff --git a/core/fpdfapi/page/BUILD.gn b/core/fpdfapi/page/BUILD.gn
index 5df39f2068..9c57fce67a 100644
--- a/core/fpdfapi/page/BUILD.gn
+++ b/core/fpdfapi/page/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/jumbo.gni")
import("../../../pdfium.gni")
+import("../../../testing/test.gni")
jumbo_source_set("page") {
sources = [
@@ -111,3 +112,17 @@ jumbo_source_set("page") {
}
visibility = [ "../../../*" ]
}
+
+pdfium_unittest_source_set("unittests") {
+ sources = [
+ "cpdf_devicecs_unittest.cpp",
+ "cpdf_pageobjectholder_unittest.cpp",
+ "cpdf_psengine_unittest.cpp",
+ "cpdf_streamcontentparser_unittest.cpp",
+ "cpdf_streamparser_unittest.cpp",
+ ]
+ deps = [
+ ":page",
+ ]
+ pdfium_root_dir = "../../../"
+}
diff --git a/core/fpdfapi/parser/BUILD.gn b/core/fpdfapi/parser/BUILD.gn
index 64306dff1d..52de29dfc9 100644
--- a/core/fpdfapi/parser/BUILD.gn
+++ b/core/fpdfapi/parser/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/jumbo.gni")
import("../../../pdfium.gni")
+import("../../../testing/test.gni")
jumbo_source_set("parser") {
sources = [
@@ -83,3 +84,34 @@ jumbo_source_set("parser") {
]
visibility = [ "../../../*" ]
}
+
+pdfium_unittest_source_set("unittests") {
+ sources = [
+ "cpdf_array_unittest.cpp",
+ "cpdf_cross_ref_avail_unittest.cpp",
+ "cpdf_document_unittest.cpp",
+ "cpdf_hint_tables_unittest.cpp",
+ "cpdf_indirect_object_holder_unittest.cpp",
+ "cpdf_object_avail_unittest.cpp",
+ "cpdf_object_unittest.cpp",
+ "cpdf_object_walker_unittest.cpp",
+ "cpdf_page_object_avail_unittest.cpp",
+ "cpdf_parser_unittest.cpp",
+ "cpdf_read_validator_unittest.cpp",
+ "cpdf_simple_parser_unittest.cpp",
+ "cpdf_stream_acc_unittest.cpp",
+ "cpdf_syntax_parser_unittest.cpp",
+ "fpdf_parser_decode_unittest.cpp",
+ "fpdf_parser_utility_unittest.cpp",
+ ]
+ deps = [
+ ":parser",
+ "../",
+ ]
+ pdfium_root_dir = "../../../"
+
+ if (is_clang) {
+ # Suppress no override warning for overridden functions.
+ cflags = [ "-Wno-inconsistent-missing-override" ]
+ }
+}