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.
This pull request includes changes to improve the test code and simplify data handling. The changes focus on replacing
vec![]
with array literals, introducing a helper function for approximate equality assertions, and simplifying the construction ofFSRSReview
instances.Improvements to test code:
src/cosine_annealing.rs
: Replacedvec![]
with array literals and used the newassert_approx_eq
helper function for asserting approximate equality in tests. [1] [2] [3]src/inference.rs
: Removed the localassert_approx_eq
function and replaced it with the newly introduced helper function fromtest_helpers.rs
. [1] [2]src/training.rs
: Replacedvec![]
with array literals and used the newassert_approx_eq
helper function for asserting approximate equality in tests. [1] [2] [3] [4]Simplification of data handling:
src/convertor_tests.rs
: Simplified the construction ofFSRSReview
instances by using tuples andinto_iter().map().collect()
. [1] [2]src/batch_shuffle.rs
: Replacedvec![]
with array literals in test assertions. [1] [2]Introduction of helper functions:
src/test_helpers.rs
: Added a newassert_approx_eq
helper function to assert approximate equality of arrays in tests.