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

feat: add inbetween tests + fix fragment ordering issue with inbetwee… #45

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

ajuvercr
Copy link
Member

…n relations

Extract inBetweenRelation parsing to separate file to promote reuse by ordered strategy.

@ajuvercr ajuvercr requested a review from smessie September 26, 2024 12:58
lib/utils/inBetween.ts Outdated Show resolved Hide resolved
lib/strategy/ordered.ts Outdated Show resolved Hide resolved
lib/condition/range.ts Show resolved Hide resolved
Comment on lines 115 to 122
if (this.min === undefined || between.min < this.min) {
this.min = between.min;
this.eqMin = true;
}
if (this.max === undefined || between.max < this.max) {
this.max = between.max;
this.eqMax = false;
}
Copy link
Member

Choose a reason for hiding this comment

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

This more in detail checking + assignments should happen in the add function below, instead of here, because in the constructor there will be no other bounds yet.

Comment on lines 168 to 171
this.min = between.min;
this.eqMin = true;
this.max = between.max;
this.eqMax = false;
Copy link
Member

Choose a reason for hiding this comment

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

Here you don't do the detailed assignments. So this should go to the constructor, and the change from the constructor should go here.

@ajuvercr ajuvercr merged commit 224fede into main Sep 27, 2024
1 check passed
@ajuvercr ajuvercr deleted the feat/inbetweentests branch September 27, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants