mikemccand commented on issue #12458: URL: https://github.com/apache/lucene/issues/12458#issuecomment-1653651762
And ... 2 -> 3 bytes DOES fail, fun :) ``` public void testUTF8TwoToThreeBytes() 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 b.addTransition(s1, s2, 0x7FF); b.addTransition(s1, s2, 0x800); 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); } ``` ``` > java.lang.AssertionError: expected:<2> but was:<2050> > at __randomizedtesting.SeedInfo.seed([E20E213BD5F7763C:1E8F5BB354E27C83]:0) > at org.junit.Assert.fail(Assert.java:89) > at org.junit.Assert.failNotEquals(Assert.java:835) > at org.junit.Assert.assertEquals(Assert.java:647) > at org.junit.Assert.assertEquals(Assert.java:633) > at org.apache.lucene.util.automaton.TestUTF32ToUTF8.testUTF8TwoToThreeBytes(TestUTF32ToUTF8.java:335) ``` -- 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