fixes for AdvancedLRU with naive implementtion, LRUCache, and AnyCallback #144
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.
Here are some changes that fix some of the issues in these 3 tests:
Note, it should be easy to change tests to work with known solutions or the challenge solution. So one idea of that is here, basically having a "class under test" or a "function under test" although parameterized tests can be used, they would cause noise when working on the project. There are probably ways to use dynamic tests or other test providers to make this work for all solutions at the same time, without being noisy to the person solving a problem.
Also tried a few other ideas here:
and fixed AdvancedLRU solution problems. Note that there are problems with this question making it complex to implement both expiry and priority/lastAccess removal that were not addressed at all in the original solution. The updated solution is klunky and naive but shows the fixes required to make both work correctly at the same time. (see #142)
Another option for solutions and tests, are to have branches with the questions solved using the same tests and function/class. But that works less well when there are multiple solutions to showcase. Not sure why solutions are private (makes them hard to test and verify)
Not sure which ideas you want from here, but this shows a bit more of some of the issues present here.