diff options
Diffstat (limited to 'config-model/src/test')
-rw-r--r-- | config-model/src/test/examples/weightedset-summaryto.sd | 15 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java | 25 |
2 files changed, 40 insertions, 0 deletions
diff --git a/config-model/src/test/examples/weightedset-summaryto.sd b/config-model/src/test/examples/weightedset-summaryto.sd new file mode 100644 index 00000000000..b72d674e743 --- /dev/null +++ b/config-model/src/test/examples/weightedset-summaryto.sd @@ -0,0 +1,15 @@ +search test { + + document test { + + field w type weightedset<string> { + summary-to: mysummary + weightedset { + create-if-nonexistent + } + + } + + } + +}
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java new file mode 100644 index 00000000000..770d11ff18e --- /dev/null +++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java @@ -0,0 +1,25 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.searchdefinition.processing; + +import com.yahoo.searchdefinition.Search; +import com.yahoo.searchdefinition.SearchBuilder; +import com.yahoo.searchdefinition.SearchDefinitionTestCase; +import com.yahoo.searchdefinition.parser.ParseException; +import com.yahoo.vespa.documentmodel.DocumentSummary; +import org.junit.Test; + +import java.io.IOException; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +/** @author bratseth */ +public class WeightedSetSummaryToTestCase extends SearchDefinitionTestCase { + + @Test + public void testRequireThatImplicitFieldsAreCreated() throws IOException, ParseException { + Search search = SearchBuilder.buildFromFile("src/test/examples/weightedset-summaryto.sd"); + assertNotNull(search); + } + +} |