diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-03-19 13:03:38 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-03-19 13:03:38 +0100 |
commit | 904c61603407b1b522a86845376b458b5b33b2ce (patch) | |
tree | 5595894fca6c00b1a0f42c7d666d8809d858a0c4 /container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java | |
parent | 7826d89cf412a8791e4ac35deb5f199e0e95526e (diff) |
Nonfunctional changes only
Diffstat (limited to 'container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java')
-rw-r--r-- | container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java b/container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java index 14900048e04..834a1986ada 100644 --- a/container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java +++ b/container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java @@ -1,7 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.prelude.query.test; - import com.yahoo.search.Query; import com.yahoo.prelude.query.CompositeItem; import com.yahoo.prelude.query.Item; @@ -9,22 +8,22 @@ import com.yahoo.search.query.parser.Parsable; import com.yahoo.search.query.parser.Parser; import com.yahoo.search.query.parser.ParserEnvironment; import com.yahoo.search.query.parser.ParserFactory; +import org.junit.Test; import java.util.Iterator; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; /** * Tests query trees * * @author bratseth */ -public class QueryTestCase extends junit.framework.TestCase { - - public QueryTestCase(String name) { - super(name); - } +public class QueryTestCase { /** Tests that query hash and equality is value dependent only */ + @Test public void testQueryEquality() { String query = "RANK (+(AND \"baz gaz faz\" bazar) -\"foo bar foobar\") foofoo xyzzy"; String filter = "foofoo -\"foo bar foobar\" xyzzy +\"baz gaz faz\" +bazar"; @@ -37,6 +36,7 @@ public class QueryTestCase extends junit.framework.TestCase { } /** Check copy of query trees is a deep copy */ + @Test public void testDeepCopy() { Item root1 = parseQuery("a and b and (c or d) and e rank f andnot g", null, Query.Type.ADVANCED); Item root2 = root1.clone(); |