mikemccand commented on issue #12458:
URL: https://github.com/apache/lucene/issues/12458#issuecomment-1653642809

   Hmm curiously the 1 -> 2 byte test case passes:
   
   ```
     public void testUTF8OneToTwoBytes() throws Exception {
       Automaton.Builder b = new Automaton.Builder();
       // start state:
       int s1 = b.createState();
   
       // single end accept state:
       int s2 = b.createState();
       b.setAccept(s2, true);
   
       // add two single-code-point terms: U+65535 and U+65536
       b.addTransition(s1, s2, 127);
       b.addTransition(s1, s2, 128);
   
       Automaton a = b.finish();
   
       CompiledAutomaton c = new CompiledAutomaton(a);
       FiniteStringsIterator it = new FiniteStringsIterator(c.automaton);
       int termCount = 0;
       for (IntsRef r = it.next(); r != null; r = it.next()) {
         termCount++;
       }
       assertEquals(2, termCount);
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to