Skip to content

test(parser): fix incorrect progress callback implementation #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void parseOptions() {
var source = "}".repeat(1024);
// NOTE: can't use _ because of palantir/palantir-java-format#934
ParseCallback callback = (offset, p) -> source.substring(offset, Integer.min(source.length(), offset + 1));
var options = new Parser.Options((state) -> state.getCurrentByteOffset() <= 1000);
var options = new Parser.Options((state) -> state.getCurrentByteOffset() >= 1000);

parser.setLanguage(language);
assertTrue(parser.parse(callback, InputEncoding.UTF_8, options).isEmpty());
Expand Down