Add unit tests for utility functions#184
Merged
macite merged 2 commits intosplashkit:developfrom Oct 18, 2024
Merged
Conversation
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.
ThothTech fork pull request: thoth-tech#68
Description
There are currently no unit tests for the functions listed under 'Utilities' in the SplashKit documentation. I have created exhaustive tests for each of these functions apart from
display_dialogas it is generates purely graphical content and would be better suited forsktests.In the process of creating the tests, I have identified issues with
replace_all,rndandrnd(min, max). I can consistently cause an infinite loop inreplace_all, and an unhanded exception in the two overloads ofrnd. Keeping those tests inskunit_testswill cause it to fail. As a compromise, I have left the tests in place and commented them. My intention is to create separate pull requests to rectify the faulty functions. Once they are fixed, the tests can be uncommented.Type of change
How Has This Been Tested?
Adding the new tests was achieved by running
cmake -G "Unix Makefiles" .followed bymakewhen in the/splashkit-core/projects/cmakedirectory.Testing Checklist
Checklist