Merged
Conversation
…e would still return true
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
…ntially fail faster
…ead track it while we're looping A anyway
Member
Author
|
I may go ahead and add tests to the functions which make use of _comp and add them in this PR |
…e _comp function internally, and testing they still work increases confidence in this change
vadi2
approved these changes
Mar 11, 2020
Chris7
pushed a commit
to Chris7/Mudlet
that referenced
this pull request
Jan 2, 2022
* Fix issue in _comp where table B containing keys table A does not have would still return true * Move table.size test to after the existing pairs loop so it will potentially fail faster * Further optimization to avoid relooping table A to get its size, instead track it while we're looping A anyway * Finished all pending tests in TableUtils_spec as most of them used the _comp function internally, and testing they still work increases confidence in this change * Removing duplicate but also strangely empty test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief overview of PR changes/additions
Currently, _comp will return true if table B has items in it which table A does not, as it loops table A and checks if table B has the same value at the same key.
This checks to make sure they're the same size first, and if not returns false
Motivation for adding to Mudlet
Bug found by busted test added in #3414
Other info (issues closed, discussion etc)