summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/processing
diff options
context:
space:
mode:
authorHarald Musum <musum@oath.com>2018-10-23 07:56:05 +0200
committerGitHub <noreply@github.com>2018-10-23 07:56:05 +0200
commitbb42d0c6f30de25b9ca6b8e232b6920aeb51a7d1 (patch)
tree0de964ad5fbd29021a4797f09afb856e3ccdd474 /config-model/src/test/java/com/yahoo/searchdefinition/processing
parent1cb09174cb579936eae49f7db632113795b0666a (diff)
Revert "Disallow complex types as keys for nested types in arrays"
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/processing')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java52
1 files changed, 0 insertions, 52 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java
deleted file mode 100644
index d6e31ac8934..00000000000
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2018 Yahoo Holdings. 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.RankProfileRegistry;
-import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.parser.ParseException;
-import org.junit.Test;
-
-/**
- * @author lesters
- */
-public class DisallowComplexMapAndWsetKeyTypesTestCase {
-
- @Test(expected = IllegalArgumentException.class)
- public void requireThatComplexTypesForMapKeysFail() throws ParseException {
- testFieldType("map<mystruct,string>");
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void requireThatComplexTypesForWsetFail() throws ParseException {
- testFieldType("weightedset<mystruct>");
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void requireThatNestedComplexTypesForMapFail() throws ParseException {
- testFieldType("array<map<mystruct,string>>");
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void requireThatNestedComplexTypesForWsetFail() throws ParseException {
- testFieldType("array<weightedset<mystruct>>");
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void requireThatDeepNestedComplexTypesForMapFail() throws ParseException {
- testFieldType("map<string,map<mystruct,string>>");
- }
-
- private void testFieldType(String fieldType) throws ParseException {
- RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
- SearchBuilder builder = new SearchBuilder(rankProfileRegistry);
- builder.importString(
- "search test {\n" +
- " document test { \n" +
- " struct mystruct {}\n" +
- " field a type " + fieldType + " {}\n" +
- " }\n" +
- "}\n");
- builder.build();
- }
-
-}