Clover Coverage Report
Coverage timestamp: Fri May 9 2008 10:54:27 EST
1   54   1   1
0   19   1   1
1     1  
1    
 
  TestSimpleExplanationsOfNonMatches       Line # 42 1 1 100% 1.0
 
  (52)
 
1    package org.apache.lucene.search;
2   
3    /**
4    * Copyright 2006 Apache Software Foundation
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10    * http://www.apache.org/licenses/LICENSE-2.0
11    *
12    * Unless required by applicable law or agreed to in writing, software
13    * distributed under the License is distributed on an "AS IS" BASIS,
14    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    * See the License for the specific language governing permissions and
16    * limitations under the License.
17    */
18   
19   
20    import org.apache.lucene.store.RAMDirectory;
21   
22    import org.apache.lucene.index.IndexWriter;
23    import org.apache.lucene.index.IndexReader;
24    import org.apache.lucene.index.Term;
25   
26    import org.apache.lucene.analysis.WhitespaceAnalyzer;
27   
28    import org.apache.lucene.document.Document;
29    import org.apache.lucene.document.Field;
30   
31    import org.apache.lucene.queryParser.QueryParser;
32    import org.apache.lucene.queryParser.ParseException;
33   
34    import junit.framework.TestCase;
35   
36    import java.util.Random;
37    import java.util.BitSet;
38   
39    /**
40    * subclass of TestSimpleExplanations that verifies non matches.
41    */
 
42    public class TestSimpleExplanationsOfNonMatches
43    extends TestSimpleExplanations {
44   
45    /**
46    * Overrides superclass to ignore matches and focus on non-matches
47    *
48    * @see CheckHits#checkNoMatchExplanations
49    */
 
50  52 toggle public void qtest(Query q, int[] expDocNrs) throws Exception {
51  52 CheckHits.checkNoMatchExplanations(q, FIELD, searcher, expDocNrs);
52    }
53   
54    }