You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TestBufferedCharFilter.Test_Ready test was missing the [Test] attribute, which was added in #1101. This test failed, however. It fails because it requires the provided TextReader to be a CharFilter where IsReady is true, and the test provides a StringReader that is not a CharFilter. We would need to determine if the upstream Harmony test was ported incorrectly, or if we need to find or create a CharFilter implementation that can be "ready" for this test to pass.
Expected Behavior
The test passes.
Steps To Reproduce
No response
Exceptions (if any)
No response
Lucene.NET Version
No response
.NET Version
No response
Operating System
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
A little insight into this. The Reader class in Java tracks some extra state that the .NET TextReader class does not. But this extra state is only required for a small number of classes in Lucene. So, rather than subclassing TextReader with a Reader class with the extra state and having to use adapters for every type of TextReader from .NET to turn it into a Reader, a new type named BufferedCharFilter was added to include both the functionality of CharFilter and the state from BufferedReader (which subclasses Reader) for those few types that required this extra tracking. This puts them in a different arrangement than in Java, so we need to account for this rewiring in the busines logic of BufferedCharFilter. The Harmony tests are from the BufferedReader class to ensure BufferedCharFilter does everything that BufferedReader does. Since this test was missing the [Test] attribute, it isn't too surprising that it doesn't pass by default and we need to analyze how the initial state of IsReady is managed in Java to fix the problem.
Specifically, the extra state tracked in Reader is:
mark (an int to track a position)
ready (a bool to indicate whether the stream is ready to be read)
Is there an existing issue for this?
Describe the bug
The
TestBufferedCharFilter.Test_Ready
test was missing the[Test]
attribute, which was added in #1101. This test failed, however. It fails because it requires the provided TextReader to be a CharFilter where IsReady is true, and the test provides a StringReader that is not a CharFilter. We would need to determine if the upstream Harmony test was ported incorrectly, or if we need to find or create a CharFilter implementation that can be "ready" for this test to pass.Expected Behavior
The test passes.
Steps To Reproduce
No response
Exceptions (if any)
No response
Lucene.NET Version
No response
.NET Version
No response
Operating System
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: