Skip to content

Introduce greaseBeginsWith: and greaseEndsWith:#157

Merged
jbrichau merged 8 commits intomasterfrom
emptySubCollectionMethods
Mar 4, 2023
Merged

Introduce greaseBeginsWith: and greaseEndsWith:#157
jbrichau merged 8 commits intomasterfrom
emptySubCollectionMethods

Conversation

@jbrichau
Copy link
Member

@jbrichau jbrichau commented Feb 5, 2023

Instead of removing the tests in #149, I propose adding new methods that define the new behaviour across all platforms consistenty. See discussion in #147.

In summary:

  • introduce greaseBeginsWith: and greaseEndsWith: on SequenceableCollection which implements the semantics of beginsWith: and endsWith: such that using an empty argument collections always returns true. This is different from the current beginsWithSubCollection: and endsWithSubCollection: which return false when used with an empty argument.
  • deprecate beginsWithSubCollection: and endsWithSubCollection:

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Base: 85.59% // Head: 84.48% // Decreases project coverage by -1.12% ⚠️

Coverage data is based on head (955fa54) compared to base (bbcb179).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   85.59%   84.48%   -1.12%     
==========================================
  Files        1837     2017     +180     
  Lines       12373    13570    +1197     
==========================================
+ Hits        10591    11464     +873     
- Misses       1782     2106     +324     
Impacted Files Coverage Δ
...ion.extension/instance/beginsWithSubCollection..st 100.00% <100.00%> (ø)
...ction.extension/instance/endsWithSubCollection..st 100.00% <100.00%> (ø)
...Collection.extension/instance/greaseBeginsWith..st 100.00% <100.00%> (ø)
...leCollection.extension/instance/greaseEndsWith..st 100.00% <100.00%> (ø)
...rtableCollectionsRule.class/instance/initialize.st 100.00% <100.00%> (ø)
...Collection.extension/instance/greaseBeginsWith..st 100.00% <100.00%> (ø)
...leCollection.extension/instance/greaseEndsWith..st 100.00% <100.00%> (ø)
...ion.extension/instance/beginsWithSubCollection..st 100.00% <100.00%> (ø)
...ction.extension/instance/endsWithSubCollection..st 100.00% <100.00%> (ø)
...Collection.extension/instance/greaseBeginsWith..st 100.00% <100.00%> (ø)
... and 180 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jbrichau
Copy link
Member Author

@marschall What do you think?

@jbrichau jbrichau merged commit 6d08b16 into master Mar 4, 2023
@jbrichau jbrichau deleted the emptySubCollectionMethods branch March 4, 2023 14:51
@marschall
Copy link
Contributor

@marschall What do you think?

👍

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