diff options
author | Jon Bratseth <jonbratseth@yahoo.com> | 2017-06-13 20:46:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 20:46:46 +0200 |
commit | a9785bfd7b01ddc83ac4b6d8d6a0e9f3222b21d4 (patch) | |
tree | adac15bff93c68cab36a260227aef3045e17901a /searchlib/src/test | |
parent | 4ae60e3fbc20e0397662c39848cab012ff052e5e (diff) |
Revert "Copyright header"
Diffstat (limited to 'searchlib/src/test')
71 files changed, 372 insertions, 374 deletions
diff --git a/searchlib/src/test/files/gbdt.ext.xml b/searchlib/src/test/files/gbdt.ext.xml index 540c0458a2a..f466751eb35 100644 --- a/searchlib/src/test/files/gbdt.ext.xml +++ b/searchlib/src/test/files/gbdt.ext.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <MlrFunction name="CHANGE THIS NUMBER" featuredef="mlrfeaturedefs.xml" version="1.0"> <!-- ADD SCORE STANDARDIZATION OR CALIBRATION HERE --> diff --git a/searchlib/src/test/files/gbdt.xml b/searchlib/src/test/files/gbdt.xml index 7da69badaab..76e64b129f3 100644 --- a/searchlib/src/test/files/gbdt.xml +++ b/searchlib/src/test/files/gbdt.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <MlrFunction name="CHANGE THIS NUMBER" featuredef="mlrfeaturedefs.xml" version="1.0"> <!-- ADD SCORE STANDARDIZATION OR CALIBRATION HERE --> diff --git a/searchlib/src/test/files/gbdt_empty_tree.xml b/searchlib/src/test/files/gbdt_empty_tree.xml index 65fc6b4f20d..15bf46471b6 100644 --- a/searchlib/src/test/files/gbdt_empty_tree.xml +++ b/searchlib/src/test/files/gbdt_empty_tree.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <MlrFunction name="CHANGE THIS NUMBER" featuredef="mlrfeaturedefs.xml" version="1.0"> <!-- ADD SCORE STANDARDIZATION OR CALIBRATION HERE --> diff --git a/searchlib/src/test/files/gbdt_err.xml b/searchlib/src/test/files/gbdt_err.xml index f05b74c31e2..aa6103c8604 100644 --- a/searchlib/src/test/files/gbdt_err.xml +++ b/searchlib/src/test/files/gbdt_err.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <Unknown /> diff --git a/searchlib/src/test/files/gbdt_set_inclusion_test.xml b/searchlib/src/test/files/gbdt_set_inclusion_test.xml index bbfe97b84ac..ad62c556c87 100644 --- a/searchlib/src/test/files/gbdt_set_inclusion_test.xml +++ b/searchlib/src/test/files/gbdt_set_inclusion_test.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <MlrFunction name="CHANGE THIS NUMBER" featuredef="mlrfeaturedefs.xml" version="1.0"> <!-- ADD SCORE STANDARDIZATION OR CALIBRATION HERE --> diff --git a/searchlib/src/test/files/gbdt_tree_response.xml b/searchlib/src/test/files/gbdt_tree_response.xml index 883af2ac71b..8bed53957d2 100644 --- a/searchlib/src/test/files/gbdt_tree_response.xml +++ b/searchlib/src/test/files/gbdt_tree_response.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <MlrFunction name="CHANGE THIS NUMBER" featuredef="mlrfeaturedefs.xml" version="1.0"> <!-- ADD SCORE STANDARDIZATION OR CALIBRATION HERE --> diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/AggregationTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/AggregationTestCase.java index 1c0212babf8..77b6726c11c 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/AggregationTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/AggregationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import com.yahoo.document.DocumentId; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ExpressionCountAggregationResultTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ExpressionCountAggregationResultTest.java index 9257e7fb429..0d7c4c8bca1 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ExpressionCountAggregationResultTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ExpressionCountAggregationResultTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import com.yahoo.searchlib.aggregation.hll.*; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ForceLoadTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ForceLoadTestCase.java index f2abc2069d7..ee7d50f33cb 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ForceLoadTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/ForceLoadTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; public class ForceLoadTestCase extends junit.framework.TestCase { diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupTestCase.java index 1b5ab25f2a7..1852f292a48 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import com.yahoo.searchlib.expression.*; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingSerializationTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingSerializationTest.java index 118eba2cd96..c684db11413 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingSerializationTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingSerializationTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import com.yahoo.document.DocumentId; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingTestCase.java index f6b324d30be..f4ae62265d7 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import com.yahoo.searchlib.expression.NullResultNode; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/MergeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/MergeTestCase.java index f94806fb00a..67361048773 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/MergeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/MergeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import com.yahoo.document.DocumentId; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/StandardDeviationAggregationResultTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/StandardDeviationAggregationResultTest.java index c5e3c2acfea..9de5f05b092 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/StandardDeviationAggregationResultTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/StandardDeviationAggregationResultTest.java @@ -1,4 +1,3 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/BiasEstimatorTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/BiasEstimatorTest.java index 66e61eb7f8e..307214d8c1c 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/BiasEstimatorTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/BiasEstimatorTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import org.junit.Test; @@ -67,4 +67,4 @@ public class BiasEstimatorTest { private static void assertEstimateEquals(double expected, double rawEstimate, BiasEstimator biasEstimator) { assertEquals(expected, biasEstimator.estimateBias(rawEstimate), 0.00000001); } -} +}
\ No newline at end of file diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogEstimatorTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogEstimatorTest.java index 56b5bf53d00..1ba4a71d102 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogEstimatorTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogEstimatorTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import net.jpountz.xxhash.XXHash32; @@ -86,4 +86,4 @@ public class HyperLogLogEstimatorTest { byte[] bytes = ByteBuffer.allocate(4).putInt(value).array(); return hashGenerator.hash(bytes, 0, 4, seed); } -} +}
\ No newline at end of file diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogPrecisionBenchmark.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogPrecisionBenchmark.java index 3a265e80c89..5dba5e48578 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogPrecisionBenchmark.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/HyperLogLogPrecisionBenchmark.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import net.jpountz.xxhash.XXHash32; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/NormalSketchTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/NormalSketchTest.java index 2158eba897c..3b0a584f37b 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/NormalSketchTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/NormalSketchTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import com.yahoo.vespa.objects.BufferSerializer; @@ -118,4 +118,4 @@ public class NormalSketchTest { } } -} +}
\ No newline at end of file diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchMergerTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchMergerTest.java index 6cad4aa380c..07488d21fd3 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchMergerTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchMergerTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import org.junit.Test; @@ -66,4 +66,4 @@ public class SketchMergerTest { assertTrue("Should return the NormalSketch instance given by the arguments.", result == s2); SketchUtils.assertSketchContains(result, 1, 2); } -} +}
\ No newline at end of file diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchUtils.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchUtils.java index 1ad36c55c21..90098f8c950 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchUtils.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SketchUtils.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import java.util.Arrays; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SparseSketchTest.java b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SparseSketchTest.java index 749e072f2cd..4be0f89514d 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SparseSketchTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/aggregation/hll/SparseSketchTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.aggregation.hll; import com.yahoo.vespa.objects.BufferSerializer; @@ -59,4 +59,4 @@ public class SparseSketchTest { assertEquals(s1.data(), s2.data()); } -} +}
\ No newline at end of file diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/ExpressionTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/ExpressionTestCase.java index d76db4e8147..62486e63f7f 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/ExpressionTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/ExpressionTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.io.GrowableByteBuffer; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/FixedWidthBucketFunctionTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/FixedWidthBucketFunctionTestCase.java index 8ec83bc1f6e..4836c9c05d2 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/FixedWidthBucketFunctionTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/FixedWidthBucketFunctionTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/FloatBucketResultNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/FloatBucketResultNodeTestCase.java index 90f61607136..a1255db4536 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/FloatBucketResultNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/FloatBucketResultNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/ForceLoadTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/ForceLoadTestCase.java index a5d216ff089..e1bfe321619 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/ForceLoadTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/ForceLoadTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; public class ForceLoadTestCase extends junit.framework.TestCase { diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerBucketResultNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerBucketResultNodeTestCase.java index 377b8e45652..a7517952703 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerBucketResultNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerBucketResultNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.vespa.objects.BufferSerializer; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerResultNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerResultNodeTestCase.java index 155c3514d7c..07c88464958 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerResultNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/IntegerResultNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.vespa.objects.BufferSerializer; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/NullResultNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/NullResultNodeTestCase.java index 3966e241fc5..9eb4ee4fea7 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/NullResultNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/NullResultNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.vespa.objects.ObjectDumper; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/ObjectVisitorTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/ObjectVisitorTestCase.java index 1d1fa8251fd..2924ee945e5 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/ObjectVisitorTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/ObjectVisitorTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.vespa.objects.ObjectDumper; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/RangeBucketPreDefFunctionTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/RangeBucketPreDefFunctionTestCase.java index d60b47aec13..d2db697c743 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/RangeBucketPreDefFunctionTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/RangeBucketPreDefFunctionTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/RawBucketResultNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/RawBucketResultNodeTestCase.java index 279a90207c6..83a36445294 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/RawBucketResultNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/RawBucketResultNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeTest.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeTest.java index bb28050656c..17744db7edb 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeTest.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeTest.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.vespa.objects.BufferSerializer; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeVectorTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeVectorTestCase.java index ec7bfb711f2..ba306099a80 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeVectorTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/ResultNodeVectorTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import com.yahoo.vespa.objects.BufferSerializer; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/StringBucketResultNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/StringBucketResultNodeTestCase.java index 34bf0ad23e6..b82c7a34048 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/StringBucketResultNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/StringBucketResultNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/TimeStampFunctionTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/TimeStampFunctionTestCase.java index 64610c73306..4d591843321 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/TimeStampFunctionTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/TimeStampFunctionTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/expression/ZCurveFunctionTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/expression/ZCurveFunctionTestCase.java index 7bd30fb75c0..899e4e28a20 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/expression/ZCurveFunctionTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/expression/ZCurveFunctionTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.expression; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtConverterTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtConverterTestCase.java index 0084180d988..fc21b3496f9 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtConverterTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtConverterTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.gbdt; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtModelTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtModelTestCase.java index 1157b9130f0..0561fb8ac7f 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtModelTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/GbdtModelTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.gbdt; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ReferenceNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ReferenceNodeTestCase.java index f61b283aed3..6b4e075b769 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ReferenceNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ReferenceNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.gbdt; import com.yahoo.searchlib.rankingexpression.evaluation.DoubleValue; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ResponseNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ResponseNodeTestCase.java index 54bdf794a07..7d6022fa304 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ResponseNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/ResponseNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.gbdt; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/TreeNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/TreeNodeTestCase.java index 6d3b2584d22..572bd2d8c11 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/TreeNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/TreeNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.gbdt; import org.junit.Test; @@ -54,4 +54,4 @@ public class TreeNodeTestCase { assertEquals("Unknown", e.getMessage()); } } -} +}
\ No newline at end of file diff --git a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/XmlHelperTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/XmlHelperTestCase.java index f09e4c04275..7dc7c42f590 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/gbdt/XmlHelperTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/gbdt/XmlHelperTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.gbdt; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/CsvFileCaseListTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/CsvFileCaseListTestCase.java index 68f705315ad..265b419a9e6 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/CsvFileCaseListTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/CsvFileCaseListTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.mlr.ga.test; import com.yahoo.searchlib.mlr.ga.TrainingParameters; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/ExampleLearningSessions.java b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/ExampleLearningSessions.java index 4de83d16300..1dce786e9e8 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/ExampleLearningSessions.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/ExampleLearningSessions.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.mlr.ga.test; import com.yahoo.searchlib.mlr.ga.PrintingTracker; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MainTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MainTestCase.java index f5febe2ab68..1cfc1fa673b 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MainTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MainTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.mlr.ga.test; import com.yahoo.searchlib.mlr.ga.Evolvable; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MockTrainingSetTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MockTrainingSetTestCase.java index 2fc6e6cab3d..b6f7d2a87ea 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MockTrainingSetTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/MockTrainingSetTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.mlr.ga.test; import com.yahoo.searchlib.mlr.ga.RankingExpressionCaseList; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/TripAdvisorFileCaseList.java b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/TripAdvisorFileCaseList.java index 7945e2605b0..a1177aebefe 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/TripAdvisorFileCaseList.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/mlr/ga/test/TripAdvisorFileCaseList.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.mlr.ga.test; import com.yahoo.searchlib.mlr.ga.CaseList; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/mlr/gbdt/ExpressionAnalysisRunner.java b/searchlib/src/test/java/com/yahoo/searchlib/mlr/gbdt/ExpressionAnalysisRunner.java index 28f90ebb0fc..301fdfcd4f2 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/mlr/gbdt/ExpressionAnalysisRunner.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/mlr/gbdt/ExpressionAnalysisRunner.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.mlr.gbdt; import org.junit.Ignore; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/ElementCompletenessTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/ElementCompletenessTestCase.java index d9f4c424314..804f34ccce8 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/ElementCompletenessTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/ElementCompletenessTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features; import static org.junit.Assert.*; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/FieldTermMatchTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/FieldTermMatchTestCase.java index 9a2438824c5..61c313956c5 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/FieldTermMatchTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/FieldTermMatchTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features; import static org.junit.Assert.*; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java index 68db4867cf7..2663fc26b1a 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features.fieldmatch; import com.yahoo.searchlib.ranking.features.fieldmatch.FieldMatchMetricsComputer; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/OptimalStringAlignmentDistance.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/OptimalStringAlignmentDistance.java index 3160cb1858a..3f55d3ed9a0 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/OptimalStringAlignmentDistance.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/OptimalStringAlignmentDistance.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features.fieldmatch.reference; import java.util.Arrays; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/TextbookLevenshteinDistance.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/TextbookLevenshteinDistance.java index 420c5ffe7fc..5ad3449a9d3 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/TextbookLevenshteinDistance.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/TextbookLevenshteinDistance.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features.fieldmatch.reference; /** diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/test/OptimalStringAlignmentTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/test/OptimalStringAlignmentTestCase.java index b2db0d0f805..f57835cdc3f 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/test/OptimalStringAlignmentTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/reference/test/OptimalStringAlignmentTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features.fieldmatch.reference.test; import com.yahoo.searchlib.ranking.features.fieldmatch.reference.OptimalStringAlignmentDistance; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/test/FieldMatchMetricsTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/test/FieldMatchMetricsTestCase.java index 6f9b0f03b6b..ef8daec2b73 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/test/FieldMatchMetricsTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/test/FieldMatchMetricsTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.ranking.features.fieldmatch.test; import com.google.common.collect.ImmutableList; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/FeatureListTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/FeatureListTestCase.java index 9b67c82f802..7399088ac1c 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/FeatureListTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/FeatureListTestCase.java @@ -1,77 +1,77 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.searchlib.rankingexpression; - -import com.yahoo.searchlib.rankingexpression.parser.ParseException; -import org.junit.Test; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.Reader; -import java.io.StringReader; -import java.util.Arrays; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> - */ -public class FeatureListTestCase { - - @Test - public void requireThatFeatureListFromStringWorks() throws ParseException { - assertFromString("attribute(foo).out", - Arrays.asList("attribute(foo).out")); - assertFromString("attribute(foo).out attribute ( bar ) . out", - Arrays.asList("attribute(foo).out", "attribute(bar).out")); - assertFromString("foo\n bar\n \t \t \n baz \n", - Arrays.asList("foo", "bar", "baz")); - assertFromString("attribute attribute(foo) attribute(foo).out attribute(bar).out.out", - Arrays.asList("attribute", "attribute(foo)", "attribute(foo).out", "attribute(bar).out.out")); - } - - @Test - public void requireThatFeatureListFromReaderWorks() throws ParseException { - assertFromReader(new StringReader("attribute(foo).out"), - Arrays.asList("attribute(foo).out")); - assertFromReader(new StringReader("attribute(foo).out attribute ( bar ) . out"), - Arrays.asList("attribute(foo).out", "attribute(bar).out")); - assertFromReader(new StringReader("foo\n bar\n \t \t \n baz \n"), - Arrays.asList("foo", "bar", "baz")); - assertFromReader(new StringReader("attribute attribute(foo) attribute(foo).out attribute(bar).out.out"), - Arrays.asList("attribute", "attribute(foo)", "attribute(foo).out", "attribute(bar).out.out")); - } - - @Test - public void requireThatFeatureListFromFileWorks() throws ParseException, FileNotFoundException { - assertFromFile(new File("src/test/files/features01.expression"), - Arrays.asList("attribute(foo).out")); - assertFromFile(new File("src/test/files/features02.expression"), - Arrays.asList("attribute(foo).out", "attribute(bar).out")); - assertFromFile(new File("src/test/files/features03.expression"), - Arrays.asList("foo", "bar", "baz")); - assertFromFile(new File("src/test/files/features04.expression"), - Arrays.asList("attribute", "attribute(foo)", "attribute(foo).out", "attribute(bar).out.out")); - } - - public void assertFromString(String input, List<String> expected) throws ParseException { - assertFeatureList(new FeatureList(input), expected); - } - - public void assertFromReader(Reader input, List<String> expected) throws ParseException { - assertFeatureList(new FeatureList(input), expected); - } - - public void assertFromFile(File input, List<String> expected) throws ParseException, FileNotFoundException { - assertFeatureList(new FeatureList(input), expected); - } - - public void assertFeatureList(FeatureList features, List<String> expected) throws ParseException { - assertEquals(expected.size(), features.size()); - for (int i = 0; i < features.size(); ++i) { - assertTrue(features.get(i) != null); - assertEquals(expected.get(i), features.get(i).toString()); - } - } -} +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.searchlib.rankingexpression;
+
+import com.yahoo.searchlib.rankingexpression.parser.ParseException;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ */
+public class FeatureListTestCase {
+
+ @Test
+ public void requireThatFeatureListFromStringWorks() throws ParseException {
+ assertFromString("attribute(foo).out",
+ Arrays.asList("attribute(foo).out"));
+ assertFromString("attribute(foo).out attribute ( bar ) . out",
+ Arrays.asList("attribute(foo).out", "attribute(bar).out"));
+ assertFromString("foo\n bar\n \t \t \n baz \n",
+ Arrays.asList("foo", "bar", "baz"));
+ assertFromString("attribute attribute(foo) attribute(foo).out attribute(bar).out.out",
+ Arrays.asList("attribute", "attribute(foo)", "attribute(foo).out", "attribute(bar).out.out"));
+ }
+
+ @Test
+ public void requireThatFeatureListFromReaderWorks() throws ParseException {
+ assertFromReader(new StringReader("attribute(foo).out"),
+ Arrays.asList("attribute(foo).out"));
+ assertFromReader(new StringReader("attribute(foo).out attribute ( bar ) . out"),
+ Arrays.asList("attribute(foo).out", "attribute(bar).out"));
+ assertFromReader(new StringReader("foo\n bar\n \t \t \n baz \n"),
+ Arrays.asList("foo", "bar", "baz"));
+ assertFromReader(new StringReader("attribute attribute(foo) attribute(foo).out attribute(bar).out.out"),
+ Arrays.asList("attribute", "attribute(foo)", "attribute(foo).out", "attribute(bar).out.out"));
+ }
+
+ @Test
+ public void requireThatFeatureListFromFileWorks() throws ParseException, FileNotFoundException {
+ assertFromFile(new File("src/test/files/features01.expression"),
+ Arrays.asList("attribute(foo).out"));
+ assertFromFile(new File("src/test/files/features02.expression"),
+ Arrays.asList("attribute(foo).out", "attribute(bar).out"));
+ assertFromFile(new File("src/test/files/features03.expression"),
+ Arrays.asList("foo", "bar", "baz"));
+ assertFromFile(new File("src/test/files/features04.expression"),
+ Arrays.asList("attribute", "attribute(foo)", "attribute(foo).out", "attribute(bar).out.out"));
+ }
+
+ public void assertFromString(String input, List<String> expected) throws ParseException {
+ assertFeatureList(new FeatureList(input), expected);
+ }
+
+ public void assertFromReader(Reader input, List<String> expected) throws ParseException {
+ assertFeatureList(new FeatureList(input), expected);
+ }
+
+ public void assertFromFile(File input, List<String> expected) throws ParseException, FileNotFoundException {
+ assertFeatureList(new FeatureList(input), expected);
+ }
+
+ public void assertFeatureList(FeatureList features, List<String> expected) throws ParseException {
+ assertEquals(expected.size(), features.size());
+ for (int i = 0; i < features.size(); ++i) {
+ assertTrue(features.get(i) != null);
+ assertEquals(expected.get(i), features.get(i).toString());
+ }
+ }
+}
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/RankingExpressionTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/RankingExpressionTestCase.java index c0157b3c8b6..f28ff739b4c 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/RankingExpressionTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/RankingExpressionTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression; import com.yahoo.searchlib.rankingexpression.parser.ParseException; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/Benchmark.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/Benchmark.java index bb2110a0f5f..7690efb1112 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/Benchmark.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/Benchmark.java @@ -1,144 +1,144 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.searchlib.rankingexpression.evaluation; - -import com.yahoo.searchlib.rankingexpression.RankingExpression; -import com.yahoo.searchlib.rankingexpression.evaluation.gbdtoptimization.GBDTForestOptimizer; -import com.yahoo.searchlib.rankingexpression.parser.ParseException; -import com.yahoo.searchlib.rankingexpression.rule.CompositeNode; -import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode; -import com.yahoo.searchlib.rankingexpression.rule.ReferenceNode; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -/** - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> - */ -public final class Benchmark { - - public static void main(String[] args) { - if (args.length < 1) { - System.err.println("Usage: Benchmark <filename> [<iterations>]"); - System.exit(1); - } - int numRuns = 1000; - if (args.length == 2) { - numRuns = Integer.valueOf(args[1]); - } - List<Result> res = new ArrayList<Result>(); - try { - BufferedReader in = new BufferedReader(new FileReader(args[0])); - StringBuilder str = new StringBuilder(); - String line; - while ((line = in.readLine()) != null) { - str.append(line); - } - String exp = str.toString(); - res.add(evaluateTree(exp, numRuns)); - res.add(evaluateTreeOptimized(exp, numRuns)); - res.add(evaluateForestOptimized(exp, numRuns)); - } catch (IOException e) { - System.out.println("An error occured while reading the content of file '" + args[0] + "': " + e); - System.exit(1); - } catch (ParseException e) { - System.out.println("An error occured while parsing the content of file '" + args[0] + "': " + e); - System.exit(1); - } - for (Result lhs : res) { - for (Result rhs : res) { - if (lhs.res < rhs.res - 1e-6 || lhs.res > rhs.res + 1e-6) { - System.err.println("Evaluation of '" + lhs.name + "' and '" + rhs.name + "' disagree on result; " + - "expected " + lhs.res + ", got " + rhs.res + "."); - System.exit(1); - } - } - System.out.format("%1$-16s : %2$8.04f ms (%3$-6.04f)\n", - lhs.name, lhs.millis, res.get(0).millis / lhs.millis); - } - } - - private static Result evaluateTree(String str, int numRuns) throws ParseException { - Result ret = new Result(); - ret.name = "Unoptimized"; - - RankingExpression exp = new RankingExpression(str); - List<String> vars = new LinkedList<String>(); - getFeatures(exp.getRoot(), vars); - - benchmark(exp, vars, new MapContext(), numRuns, ret); - return ret; - } - - private static Result evaluateTreeOptimized(String str, int numRuns) throws ParseException { - Result ret = new Result(); - ret.name = "Optimized tree"; - - RankingExpression exp = new RankingExpression(str); - List<String> vars = new LinkedList<String>(); - getFeatures(exp.getRoot(), vars); - - ArrayContext ctx = new ArrayContext(exp); - ExpressionOptimizer optimizer = new ExpressionOptimizer(); - optimizer.getOptimizer(GBDTForestOptimizer.class).setEnabled(false); - optimizer.optimize(exp, ctx); - - benchmark(exp, vars, ctx, numRuns, ret); - return ret; - } - - private static Result evaluateForestOptimized(String str, int numRuns) throws ParseException { - Result ret = new Result(); - ret.name = "Optimized forest"; - - RankingExpression exp = new RankingExpression(str); - List<String> vars = new LinkedList<String>(); - getFeatures(exp.getRoot(), vars); - - ArrayContext ctx = new ArrayContext(exp); - ExpressionOptimizer optimizer = new ExpressionOptimizer(); - optimizer.optimize(exp, ctx); - - benchmark(exp, vars, ctx, numRuns, ret); - return ret; - } - - private static void benchmark(RankingExpression exp, List<String> vars, Context ctx, int numRuns, Result out) { - for (int i = 0, len = vars.size(); i < len; ++i) { - ctx.put(vars.get(i), i / (double)len); - } - for (int i = 0; i < numRuns; ++i) { - out.res = exp.evaluate(ctx).asDouble(); - } - long begin = System.nanoTime(); - for (int i = 0; i < numRuns; ++i) { - out.res = exp.evaluate(ctx).asDouble(); - } - long end = System.nanoTime(); - - out.millis = (end - begin) / (1000.0 * 1000.0); - } - - private static void getFeatures(ExpressionNode node, List<String> out) { - if (node instanceof ReferenceNode) { - String feature = ((ReferenceNode)node).getName(); - if (!out.contains(feature)) { - out.add(feature); - } - } else if (node instanceof CompositeNode) { - CompositeNode cNode = (CompositeNode)node; - for (ExpressionNode child : cNode.children()) { - getFeatures(child, out); - } - } - } - - private static class Result { - String name = "anonymous"; - double millis = Double.MAX_VALUE; - double res = 0; - } -} +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.searchlib.rankingexpression.evaluation;
+
+import com.yahoo.searchlib.rankingexpression.RankingExpression;
+import com.yahoo.searchlib.rankingexpression.evaluation.gbdtoptimization.GBDTForestOptimizer;
+import com.yahoo.searchlib.rankingexpression.parser.ParseException;
+import com.yahoo.searchlib.rankingexpression.rule.CompositeNode;
+import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode;
+import com.yahoo.searchlib.rankingexpression.rule.ReferenceNode;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ */
+public final class Benchmark {
+
+ public static void main(String[] args) {
+ if (args.length < 1) {
+ System.err.println("Usage: Benchmark <filename> [<iterations>]");
+ System.exit(1);
+ }
+ int numRuns = 1000;
+ if (args.length == 2) {
+ numRuns = Integer.valueOf(args[1]);
+ }
+ List<Result> res = new ArrayList<Result>();
+ try {
+ BufferedReader in = new BufferedReader(new FileReader(args[0]));
+ StringBuilder str = new StringBuilder();
+ String line;
+ while ((line = in.readLine()) != null) {
+ str.append(line);
+ }
+ String exp = str.toString();
+ res.add(evaluateTree(exp, numRuns));
+ res.add(evaluateTreeOptimized(exp, numRuns));
+ res.add(evaluateForestOptimized(exp, numRuns));
+ } catch (IOException e) {
+ System.out.println("An error occured while reading the content of file '" + args[0] + "': " + e);
+ System.exit(1);
+ } catch (ParseException e) {
+ System.out.println("An error occured while parsing the content of file '" + args[0] + "': " + e);
+ System.exit(1);
+ }
+ for (Result lhs : res) {
+ for (Result rhs : res) {
+ if (lhs.res < rhs.res - 1e-6 || lhs.res > rhs.res + 1e-6) {
+ System.err.println("Evaluation of '" + lhs.name + "' and '" + rhs.name + "' disagree on result; " +
+ "expected " + lhs.res + ", got " + rhs.res + ".");
+ System.exit(1);
+ }
+ }
+ System.out.format("%1$-16s : %2$8.04f ms (%3$-6.04f)\n",
+ lhs.name, lhs.millis, res.get(0).millis / lhs.millis);
+ }
+ }
+
+ private static Result evaluateTree(String str, int numRuns) throws ParseException {
+ Result ret = new Result();
+ ret.name = "Unoptimized";
+
+ RankingExpression exp = new RankingExpression(str);
+ List<String> vars = new LinkedList<String>();
+ getFeatures(exp.getRoot(), vars);
+
+ benchmark(exp, vars, new MapContext(), numRuns, ret);
+ return ret;
+ }
+
+ private static Result evaluateTreeOptimized(String str, int numRuns) throws ParseException {
+ Result ret = new Result();
+ ret.name = "Optimized tree";
+
+ RankingExpression exp = new RankingExpression(str);
+ List<String> vars = new LinkedList<String>();
+ getFeatures(exp.getRoot(), vars);
+
+ ArrayContext ctx = new ArrayContext(exp);
+ ExpressionOptimizer optimizer = new ExpressionOptimizer();
+ optimizer.getOptimizer(GBDTForestOptimizer.class).setEnabled(false);
+ optimizer.optimize(exp, ctx);
+
+ benchmark(exp, vars, ctx, numRuns, ret);
+ return ret;
+ }
+
+ private static Result evaluateForestOptimized(String str, int numRuns) throws ParseException {
+ Result ret = new Result();
+ ret.name = "Optimized forest";
+
+ RankingExpression exp = new RankingExpression(str);
+ List<String> vars = new LinkedList<String>();
+ getFeatures(exp.getRoot(), vars);
+
+ ArrayContext ctx = new ArrayContext(exp);
+ ExpressionOptimizer optimizer = new ExpressionOptimizer();
+ optimizer.optimize(exp, ctx);
+
+ benchmark(exp, vars, ctx, numRuns, ret);
+ return ret;
+ }
+
+ private static void benchmark(RankingExpression exp, List<String> vars, Context ctx, int numRuns, Result out) {
+ for (int i = 0, len = vars.size(); i < len; ++i) {
+ ctx.put(vars.get(i), i / (double)len);
+ }
+ for (int i = 0; i < numRuns; ++i) {
+ out.res = exp.evaluate(ctx).asDouble();
+ }
+ long begin = System.nanoTime();
+ for (int i = 0; i < numRuns; ++i) {
+ out.res = exp.evaluate(ctx).asDouble();
+ }
+ long end = System.nanoTime();
+
+ out.millis = (end - begin) / (1000.0 * 1000.0);
+ }
+
+ private static void getFeatures(ExpressionNode node, List<String> out) {
+ if (node instanceof ReferenceNode) {
+ String feature = ((ReferenceNode)node).getName();
+ if (!out.contains(feature)) {
+ out.add(feature);
+ }
+ } else if (node instanceof CompositeNode) {
+ CompositeNode cNode = (CompositeNode)node;
+ for (ExpressionNode child : cNode.children()) {
+ getFeatures(child, out);
+ }
+ }
+ }
+
+ private static class Result {
+ String name = "anonymous";
+ double millis = Double.MAX_VALUE;
+ double res = 0;
+ }
+}
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationBenchmark.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationBenchmark.java index ac24680e601..708235647e6 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationBenchmark.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationBenchmark.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation; import com.yahoo.io.IOUtils; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java index f80d8df79a6..deaf1070d45 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation; import com.yahoo.javacc.UnicodeUtilities; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTester.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTester.java index 47ef69b914a..2ce3d5b5eca 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTester.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTester.java @@ -1,4 +1,3 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/NeuralNetEvaluationTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/NeuralNetEvaluationTestCase.java index dc1846feaa6..edf1da08af0 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/NeuralNetEvaluationTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/NeuralNetEvaluationTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/StreamEvaluationBenchmark.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/StreamEvaluationBenchmark.java index 280ffc6278b..837c7401813 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/StreamEvaluationBenchmark.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/StreamEvaluationBenchmark.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation; import com.yahoo.io.IOUtils; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/ContextReuseTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/ContextReuseTestCase.java index 3d5710b81e0..998f25b943a 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/ContextReuseTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/ContextReuseTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation.gbdtoptimization; import com.yahoo.io.IOUtils; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTForestOptimizerTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTForestOptimizerTestCase.java index 420819a8b2a..7058e909ef1 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTForestOptimizerTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTForestOptimizerTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation.gbdtoptimization; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTOptimizerTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTOptimizerTestCase.java index 1cbd19b667e..993262b1241 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTOptimizerTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTOptimizerTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.evaluation.gbdtoptimization; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ArgumentsTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ArgumentsTestCase.java index 867331e99ce..5402935697d 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ArgumentsTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ArgumentsTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.rule; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNodeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNodeTestCase.java index 75b8e1122c1..6070a3805c6 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNodeTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNodeTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.rule; import org.junit.Test; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/ConstantDereferencerTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/ConstantDereferencerTestCase.java index 4035e499a6a..851eafd2ac8 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/ConstantDereferencerTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/ConstantDereferencerTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.transform; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/SimplifierTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/SimplifierTestCase.java index f9d2472e306..61b230ab390 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/SimplifierTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/transform/SimplifierTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchlib.rankingexpression.transform; import com.yahoo.searchlib.rankingexpression.RankingExpression; diff --git a/searchlib/src/test/java/com/yahoo/searchlib/treenet/TreeNetParserTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/treenet/TreeNetParserTestCase.java index cd7643b9f74..0e27d53338a 100755 --- a/searchlib/src/test/java/com/yahoo/searchlib/treenet/TreeNetParserTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/treenet/TreeNetParserTestCase.java @@ -1,79 +1,79 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.searchlib.treenet; - -import com.yahoo.searchlib.rankingexpression.RankingExpression; -import com.yahoo.searchlib.treenet.parser.ParseException; -import com.yahoo.searchlib.treenet.parser.TreeNetParser; -import junit.framework.TestCase; - -import java.io.*; - -/** - * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> - */ -public class TreeNetParserTestCase extends TestCase { - - private static final boolean WRITE_FILES = false; - - public void testRankingExpression() { - for (int i = 1; i <= 8; ++i) { - String inputFile = String.format("src/test/files/treenet%02d.model", i); - String outputFile = String.format("src/test/files/ranking%02d.expression", i); - String input = readFile(inputFile); - String expression = convertModel(inputFile, input); - if (WRITE_FILES) { - writeFile(outputFile, expression); - } - else { - String output = readFile(outputFile); - assertParseable(output, outputFile); - assertEquals(output.trim(), expression); - } - } - } - - private void assertParseable(String rankingExpressionString,String fileName) { - try { - new RankingExpression(rankingExpressionString); - } - catch (com.yahoo.searchlib.rankingexpression.parser.ParseException e) { - throw new RuntimeException("Could not parse ranking expression in '" + fileName + "'",e); - } - } - - private String convertModel(String modelFile, String model) { - try { - TreeNetParser parser = new TreeNetParser(new StringReader(model)); - return parser.treeNet().toRankingExpression(); - } catch (ParseException e) { - throw new AssertionError("In model " + modelFile + ": " + e.getMessage(), e); - } - } - - private String readFile(String file) { - try { - StringBuilder ret = new StringBuilder(); - BufferedReader in = new BufferedReader(new FileReader(file)); - while (true) { - String str = in.readLine(); - if (str == null) { - break; - } - ret.append(str).append("\n"); - } - return ret.toString(); - } catch (IOException e) { - throw new AssertionError(e); - } - } - - private void writeFile(String file, String content) { - try { - FileWriter out = new FileWriter(file); - out.write(content); - out.close(); - } catch (IOException e) { - throw new AssertionError(e); - } - } -} +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.searchlib.treenet;
+
+import com.yahoo.searchlib.rankingexpression.RankingExpression;
+import com.yahoo.searchlib.treenet.parser.ParseException;
+import com.yahoo.searchlib.treenet.parser.TreeNetParser;
+import junit.framework.TestCase;
+
+import java.io.*;
+
+/**
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ */
+public class TreeNetParserTestCase extends TestCase {
+
+ private static final boolean WRITE_FILES = false;
+
+ public void testRankingExpression() {
+ for (int i = 1; i <= 8; ++i) {
+ String inputFile = String.format("src/test/files/treenet%02d.model", i);
+ String outputFile = String.format("src/test/files/ranking%02d.expression", i);
+ String input = readFile(inputFile);
+ String expression = convertModel(inputFile, input);
+ if (WRITE_FILES) {
+ writeFile(outputFile, expression);
+ }
+ else {
+ String output = readFile(outputFile);
+ assertParseable(output, outputFile);
+ assertEquals(output.trim(), expression);
+ }
+ }
+ }
+
+ private void assertParseable(String rankingExpressionString,String fileName) {
+ try {
+ new RankingExpression(rankingExpressionString);
+ }
+ catch (com.yahoo.searchlib.rankingexpression.parser.ParseException e) {
+ throw new RuntimeException("Could not parse ranking expression in '" + fileName + "'",e);
+ }
+ }
+
+ private String convertModel(String modelFile, String model) {
+ try {
+ TreeNetParser parser = new TreeNetParser(new StringReader(model));
+ return parser.treeNet().toRankingExpression();
+ } catch (ParseException e) {
+ throw new AssertionError("In model " + modelFile + ": " + e.getMessage(), e);
+ }
+ }
+
+ private String readFile(String file) {
+ try {
+ StringBuilder ret = new StringBuilder();
+ BufferedReader in = new BufferedReader(new FileReader(file));
+ while (true) {
+ String str = in.readLine();
+ if (str == null) {
+ break;
+ }
+ ret.append(str).append("\n");
+ }
+ return ret.toString();
+ } catch (IOException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+ private void writeFile(String file, String content) {
+ try {
+ FileWriter out = new FileWriter(file);
+ out.write(content);
+ out.close();
+ } catch (IOException e) {
+ throw new AssertionError(e);
+ }
+ }
+}
|