Skip to content
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

Fix incorrect index returned when using posRangeToIndexRange #156

Merged
merged 3 commits into from
Jan 31, 2024
Merged

Conversation

7hong13
Copy link
Contributor

@7hong13 7hong13 commented Jan 31, 2024

What this PR does / why we need it?

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@7hong13 7hong13 added the bug 🐞 Something isn't working label Jan 31, 2024
@7hong13 7hong13 added this to the 0.4.15 milestone Jan 31, 2024
@7hong13 7hong13 requested review from hackerwins and skhugh January 31, 2024 06:35
@7hong13 7hong13 self-assigned this Jan 31, 2024
@@ -1743,6 +1746,65 @@ class JsonTreeTest {
}
}

@Test
fun test_returning_range_from_index_correctly_withint_document_events() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fun test_returning_range_from_index_correctly_withint_document_events() {
fun test_returning_range_from_index_correctly_within_document_events() {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 34eea6e.

if (node.id.createdAt <= executedAt) break
updatedLeftSiblingNode = node
}
updatedLeftSiblingNode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this line needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed in a9b50ca

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8661963) 79.62% compared to head (a9b50ca) 79.64%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
+ Coverage   79.62%   79.64%   +0.02%     
==========================================
  Files          63       63              
  Lines        3853     3857       +4     
  Branches      603      604       +1     
==========================================
+ Hits         3068     3072       +4     
  Misses        459      459              
  Partials      326      326              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@7hong13 7hong13 merged commit ba991b5 into main Jan 31, 2024
6 checks passed
@7hong13 7hong13 deleted the fix_index branch January 31, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants