diff options
Diffstat (limited to 'document/src')
4 files changed, 32 insertions, 0 deletions
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); + +} |