[ 
https://issues.apache.org/jira/browse/LUCENE-1692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721460#action_12721460
 ] 

Michael McCandless commented on LUCENE-1692:
--------------------------------------------

I'm seeing this test failure:
{code}
    [junit] Testcase: 
testBuggyPunctuation(org.apache.lucene.analysis.cn.TestSmartChineseAnalyzer):   
  Caused an ERROR
    [junit] null
    [junit] java.lang.AssertionError
    [junit]     at 
org.apache.lucene.analysis.StopFilter.next(StopFilter.java:240)
    [junit]     at 
org.apache.lucene.analysis.cn.TestSmartChineseAnalyzer.testBuggyPunctuation(TestSmartChineseAnalyzer.java:51)
{code}

It's because null is being passed to ts.next in the final assertTrue line:

{code}
    nt = ts.next(nt);
    while (nt != null) {
      assertEquals(result[i], nt.term());
      i++;
      nt = ts.next(nt);
    }
    assertTrue(ts.next(nt) == null);
{code}

> Contrib analyzers need tests
> ----------------------------
>
>                 Key: LUCENE-1692
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1692
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: contrib/analyzers
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: LUCENE-1692.txt, LUCENE-1692.txt, LUCENE-1692.txt, 
> LUCENE-1692.txt
>
>
> The analyzers in contrib need tests, preferably ones that test the behavior 
> of all the Token 'attributes' involved (offsets, type, etc) and not just what 
> they do with token text.
> This way, they can be converted to the new api without breakage.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to