summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-06-20 10:38:06 +0200
committerArne Juul <arnej@yahoo-inc.com>2018-06-20 10:38:06 +0200
commitd161b6bcb87566a31cb5e0700b84f968539f502f (patch)
treecfbc4612f439510afffd8fc190bf7eeec2a52ae7 /searchlib/src/tests
parent2915ddaa1c176a47d6c62d3b25bad9bb369c1448 (diff)
move LOG_SETUP after other includes
Diffstat (limited to 'searchlib/src/tests')
-rw-r--r--searchlib/src/tests/aggregator/attr_test.cpp6
-rw-r--r--searchlib/src/tests/aggregator/perdocexpr.cpp6
-rw-r--r--searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp6
-rw-r--r--searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/postinglist/postinglist.cpp6
-rw-r--r--searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp7
-rw-r--r--searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp6
-rw-r--r--searchlib/src/tests/btree/frozenbtree_test.cpp6
-rw-r--r--searchlib/src/tests/btree/iteratespeed.cpp6
-rw-r--r--searchlib/src/tests/diskindex/fusion/fusion_test.cpp6
-rw-r--r--searchlib/src/tests/grouping/grouping_test.cpp6
-rw-r--r--searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp6
-rw-r--r--searchlib/src/tests/groupingengine/groupingengine_test.cpp6
-rw-r--r--searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp6
-rw-r--r--searchlib/src/tests/predicate/simple_index_test.cpp6
-rw-r--r--searchlib/src/tests/queryeval/queryeval.cpp7
18 files changed, 54 insertions, 56 deletions
diff --git a/searchlib/src/tests/aggregator/attr_test.cpp b/searchlib/src/tests/aggregator/attr_test.cpp
index c57f335aceb..21fc41e3b9d 100644
--- a/searchlib/src/tests/aggregator/attr_test.cpp
+++ b/searchlib/src/tests/aggregator/attr_test.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/log/log.h>
-LOG_SETUP("attr_test");
-
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
#include <vespa/searchlib/attribute/extendableattributes.h>
@@ -11,6 +8,9 @@ LOG_SETUP("attr_test");
#include <vespa/searchlib/expression/arrayatlookupfunctionnode.h>
#include <vespa/searchlib/expression/interpolatedlookupfunctionnode.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attr_test");
+
using namespace search;
using namespace search::expression;
using namespace vespalib;
diff --git a/searchlib/src/tests/aggregator/perdocexpr.cpp b/searchlib/src/tests/aggregator/perdocexpr.cpp
index 9837deb0186..25bbd16de07 100644
--- a/searchlib/src/tests/aggregator/perdocexpr.cpp
+++ b/searchlib/src/tests/aggregator/perdocexpr.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("per_doc_expr_test");
-
#include <vespa/searchlib/aggregation/aggregation.h>
#include <vespa/searchlib/aggregation/expressioncountaggregationresult.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
@@ -17,6 +14,9 @@ LOG_SETUP("per_doc_expr_test");
#include <iostream>
#include <list>
+#include <vespa/log/log.h>
+LOG_SETUP("per_doc_expr_test");
+
#define MU std::make_unique
using namespace search;
diff --git a/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp b/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp
index 0eb2dd2cbc4..5f10f5ad631 100644
--- a/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp
+++ b/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attributebenchmark");
-
#include <vespa/searchlib/util/randomgenerator.h>
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributeguard.h>
@@ -21,6 +18,9 @@ LOG_SETUP("attributebenchmark");
#include "attributeupdater.h"
#include <sys/resource.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attributebenchmark");
+
using std::shared_ptr;
typedef std::vector<uint32_t> NumVector;
diff --git a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
index 9df37e36b49..9a7552ce681 100644
--- a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
+++ b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
@@ -1,9 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/log/log.h>
-LOG_SETUP("document_weight_iterator_test");
-
#include <vespa/searchlib/attribute/i_document_weight_attribute.h>
#include <vespa/searchlib/attribute/attributevector.h>
#include <vespa/searchlib/attribute/attribute.h>
@@ -28,6 +25,9 @@ LOG_SETUP("document_weight_iterator_test");
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/searchlib/queryeval/document_weight_search_iterator.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_weight_iterator_test");
+
using namespace search;
using namespace search::attribute;
diff --git a/searchlib/src/tests/attribute/postinglist/postinglist.cpp b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
index eb8712b774c..fe79db163f8 100644
--- a/searchlib/src/tests/attribute/postinglist/postinglist.cpp
+++ b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("postinglist_test");
-
#include <vespa/searchlib/datastore/datastore.h>
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <vespa/searchlib/btree/btreenode.hpp>
@@ -14,6 +11,9 @@ LOG_SETUP("postinglist_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <set>
+#include <vespa/log/log.h>
+LOG_SETUP("postinglist_test");
+
namespace search {
using vespalib::GenerationHandler;
diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
index ffdf01ce494..f0496049f0e 100644
--- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
+++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("postinglistattribute_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/asciistream.h>
@@ -21,6 +18,9 @@ LOG_SETUP("postinglistattribute_test");
#include <vespa/fastos/file.h>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("postinglistattribute_test");
+
using std::shared_ptr;
bool
diff --git a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
index cbb8f18f9f8..9ed08643def 100644
--- a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_searchable_adapter_test");
-
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchcommon/attribute/iattributecontext.h>
#include <vespa/searchlib/attribute/attribute_blueprint_factory.h>
@@ -31,6 +28,9 @@ LOG_SETUP("attribute_searchable_adapter_test");
#include <vespa/searchlib/queryeval/wand/parallel_weak_and_search.h>
#include <memory>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_searchable_adapter_test");
+
using search::AttributeFactory;
using search::AttributeGuard;
using search::AttributeVector;
diff --git a/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp
index c5805447d7f..be64edf89f2 100644
--- a/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_weighted_set_blueprint_test");
-
#include <vespa/searchlib/attribute/attribute_blueprint_factory.h>
#include <vespa/searchlib/attribute/attribute_weighted_set_blueprint.h>
#include <vespa/searchlib/attribute/attributecontext.h>
@@ -16,9 +13,11 @@ LOG_SETUP("attribute_weighted_set_blueprint_test");
#include <vespa/searchlib/queryeval/fake_result.h>
#include <vespa/searchlib/queryeval/weighted_set_term_search.h>
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
-
#include <vespa/searchlib/attribute/enumstore.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_weighted_set_blueprint_test");
+
using namespace search;
using namespace search::query;
using namespace search::fef;
diff --git a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
index 2b8279c6822..dc7cf53d188 100644
--- a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("attributeblueprint_test");
-
#include <vespa/searchcommon/attribute/iattributecontext.h>
#include <vespa/searchlib/attribute/attribute_blueprint_factory.h>
#include <vespa/searchlib/attribute/attributecontext.h>
@@ -18,6 +15,9 @@ LOG_SETUP("attributeblueprint_test");
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attributeblueprint_test");
+
using search::AttributeGuard;
using search::AttributeVector;
using search::IAttributeManager;
diff --git a/searchlib/src/tests/btree/frozenbtree_test.cpp b/searchlib/src/tests/btree/frozenbtree_test.cpp
index 871752b7a0d..988239a5438 100644
--- a/searchlib/src/tests/btree/frozenbtree_test.cpp
+++ b/searchlib/src/tests/btree/frozenbtree_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("frozenbtree_test");
-
#define DEBUG_FROZENBTREE
#define LOG_FROZENBTREEXX
#include <vespa/vespalib/testkit/testapp.h>
@@ -13,6 +10,9 @@ LOG_SETUP("frozenbtree_test");
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <map>
+#include <vespa/log/log.h>
+LOG_SETUP("frozenbtree_test");
+
using search::btree::BTreeRoot;
using search::btree::BTreeNode;
using search::btree::BTreeInternalNode;
diff --git a/searchlib/src/tests/btree/iteratespeed.cpp b/searchlib/src/tests/btree/iteratespeed.cpp
index 6e6029335e8..2f60b06d675 100644
--- a/searchlib/src/tests/btree/iteratespeed.cpp
+++ b/searchlib/src/tests/btree/iteratespeed.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("iteratespeed");
-
#include <vespa/searchlib/btree/btreeroot.h>
#include <vespa/searchlib/btree/btreebuilder.h>
#include <vespa/searchlib/btree/btreenodeallocator.h>
@@ -21,6 +18,9 @@ LOG_SETUP("iteratespeed");
#include <vespa/fastos/app.h>
#include <vespa/fastos/timestamp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("iteratespeed");
+
namespace search {
namespace btree {
diff --git a/searchlib/src/tests/diskindex/fusion/fusion_test.cpp b/searchlib/src/tests/diskindex/fusion/fusion_test.cpp
index 12c9d52356a..809688bdb2e 100644
--- a/searchlib/src/tests/diskindex/fusion/fusion_test.cpp
+++ b/searchlib/src/tests/diskindex/fusion/fusion_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("fusion_test");
-
#include <vespa/searchlib/diskindex/fusion.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/diskindex/zcposoccrandread.h>
@@ -21,6 +18,9 @@ LOG_SETUP("fusion_test");
#include <vespa/searchlib/util/filekit.h>
#include <vespa/searchlib/common/sequencedtaskexecutor.h>
+#include <vespa/log/log.h>
+LOG_SETUP("fusion_test");
+
namespace search {
using document::Document;
diff --git a/searchlib/src/tests/grouping/grouping_test.cpp b/searchlib/src/tests/grouping/grouping_test.cpp
index a10890fba5e..4cf9eb6f5c6 100644
--- a/searchlib/src/tests/grouping/grouping_test.cpp
+++ b/searchlib/src/tests/grouping/grouping_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
@@ -16,6 +13,9 @@ LOG_SETUP("grouping_test");
#include <cmath>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_test");
+
using namespace vespalib;
using namespace search;
using namespace search::aggregation;
diff --git a/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp b/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp
index f414e298869..37aa9cc3268 100644
--- a/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp
+++ b/searchlib/src/tests/groupingengine/groupingengine_benchmark.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_benchmark");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
@@ -18,6 +15,9 @@ LOG_SETUP("grouping_benchmark");
#include <vespa/vespalib/util/rusage.h>
#include <csignal>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_benchmark");
+
using namespace vespalib;
using namespace search;
using namespace search::attribute;
diff --git a/searchlib/src/tests/groupingengine/groupingengine_test.cpp b/searchlib/src/tests/groupingengine/groupingengine_test.cpp
index 06daaaca10f..a0a6c5cf4c2 100644
--- a/searchlib/src/tests/groupingengine/groupingengine_test.cpp
+++ b/searchlib/src/tests/groupingengine/groupingengine_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("grouping_engine_test");
-
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
@@ -17,6 +14,9 @@ LOG_SETUP("grouping_engine_test");
#include <cmath>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_engine_test");
+
using namespace vespalib;
using namespace search;
using namespace search::attribute;
diff --git a/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp b/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp
index 8e921712cf6..c926d1c2831 100644
--- a/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp
+++ b/searchlib/src/tests/memoryindex/dictionary/dictionary_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("dictionary_test");
-
#include <vespa/searchlib/diskindex/fusion.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
#include <vespa/searchlib/diskindex/zcposoccrandread.h>
@@ -21,6 +18,9 @@ LOG_SETUP("dictionary_test");
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("dictionary_test");
+
namespace search {
using namespace btree;
diff --git a/searchlib/src/tests/predicate/simple_index_test.cpp b/searchlib/src/tests/predicate/simple_index_test.cpp
index 30cc0b2e4bb..fbb0a5933c9 100644
--- a/searchlib/src/tests/predicate/simple_index_test.cpp
+++ b/searchlib/src/tests/predicate/simple_index_test.cpp
@@ -1,13 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for simple_index.
-#include <vespa/log/log.h>
-LOG_SETUP("simple_index_test");
-
#include <vespa/searchlib/predicate/simple_index.hpp>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/attribute/predicate_attribute.h>
+#include <vespa/log/log.h>
+LOG_SETUP("simple_index_test");
+
using namespace search;
using namespace search::predicate;
using vespalib::GenerationHolder;
diff --git a/searchlib/src/tests/queryeval/queryeval.cpp b/searchlib/src/tests/queryeval/queryeval.cpp
index 1ad0b643799..9f4d8403d76 100644
--- a/searchlib/src/tests/queryeval/queryeval.cpp
+++ b/searchlib/src/tests/queryeval/queryeval.cpp
@@ -1,8 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("query_eval_test");
-
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchlib/test/initrange.h>
#include <vespa/searchlib/common/bitvectoriterator.h>
@@ -21,9 +18,11 @@ LOG_SETUP("query_eval_test");
#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/searchlib/queryeval/isourceselector.h>
-
#include <vespa/searchlib/fef/fef.h>
+#include <vespa/log/log.h>
+LOG_SETUP("query_eval_test");
+
using namespace search::queryeval;
using search::BitVector;
using search::BitVectorIterator;