summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-10-20 08:50:09 +0000
committerTor Egge <Tor.Egge@oath.com>2017-10-20 08:50:09 +0000
commitbd8b54938748810e435b1bf0e1c32953090768c0 (patch)
tree6306fec28ad7496e9c1ce457d81b0a5054450164 /document
parent52f05c73d091ccf8c00024a3ca377987eec6d5ee (diff)
Move test function makeDocumentBucket to document module.
Diffstat (limited to 'document')
-rw-r--r--document/CMakeLists.txt1
-rw-r--r--document/src/vespa/document/CMakeLists.txt1
-rw-r--r--document/src/vespa/document/test/CMakeLists.txt6
-rw-r--r--document/src/vespa/document/test/make_document_bucket.cpp12
-rw-r--r--document/src/vespa/document/test/make_document_bucket.h13
5 files changed, 33 insertions, 0 deletions
diff --git a/document/CMakeLists.txt b/document/CMakeLists.txt
index 72f4ee445fb..fd347ca492d 100644
--- a/document/CMakeLists.txt
+++ b/document/CMakeLists.txt
@@ -23,6 +23,7 @@ vespa_define_module(
src/vespa/document/serialization
src/vespa/document/update
src/vespa/document/util
+ src/vespa/document/test
TEST_DEPENDS
vdstestlib
diff --git a/document/src/vespa/document/CMakeLists.txt b/document/src/vespa/document/CMakeLists.txt
index 8d6999fdc24..7ae341f6d4b 100644
--- a/document/src/vespa/document/CMakeLists.txt
+++ b/document/src/vespa/document/CMakeLists.txt
@@ -14,6 +14,7 @@ vespa_add_library(document
$<TARGET_OBJECTS:document_repo>
$<TARGET_OBJECTS:document_serialization>
$<TARGET_OBJECTS:document_predicate>
+ $<TARGET_OBJECTS:document_test>
INSTALL lib64
DEPENDS
)
diff --git a/document/src/vespa/document/test/CMakeLists.txt b/document/src/vespa/document/test/CMakeLists.txt
new file mode 100644
index 00000000000..f16bfe0144a
--- /dev/null
+++ b/document/src/vespa/document/test/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+vespa_add_library(document_test OBJECT
+ SOURCES
+ make_document_bucket.cpp
+ DEPENDS
+)
diff --git a/document/src/vespa/document/test/make_document_bucket.cpp b/document/src/vespa/document/test/make_document_bucket.cpp
new file mode 100644
index 00000000000..f4d22f7b83f
--- /dev/null
+++ b/document/src/vespa/document/test/make_document_bucket.cpp
@@ -0,0 +1,12 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "make_document_bucket.h"
+
+namespace document::test {
+
+Bucket makeDocumentBucket(BucketId bucketId)
+{
+ return Bucket(BucketSpace::placeHolder(), bucketId);
+}
+
+}
diff --git a/document/src/vespa/document/test/make_document_bucket.h b/document/src/vespa/document/test/make_document_bucket.h
new file mode 100644
index 00000000000..8c7411cc0e8
--- /dev/null
+++ b/document/src/vespa/document/test/make_document_bucket.h
@@ -0,0 +1,13 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/document/bucket/bucket.h>
+
+namespace document::test {
+
+// Helper function used by unit tests
+
+Bucket makeDocumentBucket(BucketId bucketId);
+
+}