diff options
author | Tor Egge <Tor.Egge@oath.com> | 2017-10-20 08:50:09 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2017-10-20 08:50:09 +0000 |
commit | bd8b54938748810e435b1bf0e1c32953090768c0 (patch) | |
tree | 6306fec28ad7496e9c1ce457d81b0a5054450164 /document/src | |
parent | 52f05c73d091ccf8c00024a3ca377987eec6d5ee (diff) |
Move test function makeDocumentBucket to document module.
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); + +} |