summaryrefslogtreecommitdiffstats
path: root/document/src/tests/serialization/annotationserializer_test.cpp
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2016-08-23 15:10:36 +0200
committerVegard Sjonfjell <vegardsjo@gmail.com>2016-08-23 15:10:36 +0200
commit55e5a91901109161186e05d3a6e959e06958bbba (patch)
treef312bab2c60207ee305dbcfa047fcc4fa8fd2dc1 /document/src/tests/serialization/annotationserializer_test.cpp
parentd337a29392fb752dc725e4aea5efa0cc0df5f17a (diff)
Aressem/cmake more out of source tests (#441)
* vespalib tests run out of source. * staging_vespalib run tests out of source. * fastos tests run out of source. * Fixed storage tests out of source. * Fixed some of the config tests. * config* tests run out of source. * document_* tests run out of source. * documentapi_ tests run out of source. * Fixed fsa out of source tests. * Fix jrt_test out of source. * More tests run out of source. * Fix some slobrok and messagebus tests. * More fixes for out of source tests. * Done with first pass of regular tests out of source. * Only use SOURCE_DIRECTORY in a limited set of places. * Fix some remaining tests. * Some cleanups. * No need for extra slash.
Diffstat (limited to 'document/src/tests/serialization/annotationserializer_test.cpp')
-rw-r--r--document/src/tests/serialization/annotationserializer_test.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/document/src/tests/serialization/annotationserializer_test.cpp b/document/src/tests/serialization/annotationserializer_test.cpp
index 1cc3fc19373..e4321953620 100644
--- a/document/src/tests/serialization/annotationserializer_test.cpp
+++ b/document/src/tests/serialization/annotationserializer_test.cpp
@@ -80,9 +80,11 @@ Test::readSpanTree(const string &file_name, const FixedTypeRepo &repo) {
}
void Test::requireThatSimpleSpanTreeIsDeserialized() {
- DocumentTypeRepo type_repo(readDocumenttypesConfig("annotation.serialize.test.repo.cfg"));
+ DocumentTypeRepo type_repo(readDocumenttypesConfig(
+ vespalib::TestApp::GetSourceDirectory() + "annotation.serialize.test.repo.cfg"));
FixedTypeRepo repo(type_repo);
- SpanTree::UP span_tree = std::move(readSpanTree("test_data_serialized_simple", repo).front());
+ SpanTree::UP span_tree = std::move(readSpanTree(
+ vespalib::TestApp::GetSourceDirectory() + "test_data_serialized_simple", repo).front());
EXPECT_EQUAL("html", span_tree->getName());
const SimpleSpanList *root = dynamic_cast<const SimpleSpanList *>(&span_tree->getRoot());
@@ -126,9 +128,10 @@ struct AnnotationComparator {
void Test::requireThatAdvancedSpanTreeIsDeserialized() {
DocumentTypeRepo type_repo(
- readDocumenttypesConfig("annotation.serialize.test.repo.cfg"));
+ readDocumenttypesConfig(vespalib::TestApp::GetSourceDirectory() + "annotation.serialize.test.repo.cfg"));
FixedTypeRepo repo(type_repo, "my_document");
- SpanTree::UP span_tree = std::move(readSpanTree("test_data_serialized_advanced", repo).front());
+ SpanTree::UP span_tree = std::move(readSpanTree(
+ vespalib::TestApp::GetSourceDirectory() + "test_data_serialized_advanced", repo).front());
EXPECT_EQUAL("html", span_tree->getName());
const SpanList *root = dynamic_cast<const SpanList *>(&span_tree->getRoot());
@@ -220,9 +223,9 @@ void Test::requireThatAdvancedSpanTreeIsDeserialized() {
void Test::requireThatSpanTreeCanBeSerialized() {
DocumentTypeRepo type_repo(
- readDocumenttypesConfig("annotation.serialize.test.repo.cfg"));
+ readDocumenttypesConfig(vespalib::TestApp::GetSourceDirectory() + "annotation.serialize.test.repo.cfg"));
FixedTypeRepo repo(type_repo, "my_document");
- string file_name = "test_data_serialized_advanced";
+ string file_name = vespalib::TestApp::GetSourceDirectory() + "test_data_serialized_advanced";
FastOS_File file(file_name.c_str());
ASSERT_TRUE(file.OpenReadOnlyExisting());