-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for handling invalid UTF-8 insertion strings in WelSupportedTest #346
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## latest #346 +/- ##
=======================================
Coverage 91.55% 91.55%
=======================================
Files 43 43
Lines 3660 3660
Branches 474 474
=======================================
Hits 3351 3351
Misses 216 216
Partials 93 93 ☔ View full report in Codecov by Sentry. |
I'm converting this to a draft for now just to make it clear that this is still in work. Once you're all finished with it or you need help, let me know and I'll review it. |
Sure thing. The problem I'm facing is that I'm currently using a Mac M1 and since the test is particularly Windows related, I can't really find a way to compile the files/ run the workflows locally. There's really no way for me to know the checks before pushing. Can you suggest a workaround? |
Without having access to a Windows machine to work on, this will be a little more difficult for you. One possible workaround is to enable Github Actions on your fork, remove all workflows but the Windows ones, and push to it to run the Windows CI workflows when you need to test something. You'd need to be sure to add the original workflow files before the request is marked as ready. You could also try something like Wine, but the library hasn't been tested on this and I wouldn't be able to offer any support for getting it working. Using Actions on your own fork is probably the easiest thing to do, so that you won't need to wait for me to approve runs on the upstream repository. |
5f86299
to
9fadd63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for putting these tests together, they are mostly ready! There are a few updates for you to make listed below, after which I will merge this in.
Description
This pull request addresses issue #273. Adds new tests to the
WelSupportedTest
fixture in order to handle invalid UTF-8 insertion strings. The tests focus on various scenarios to ensure correct behaviour and error handling.Test Cases
InvalidUtf8InsertionString
: This test verifies that an error is raised when an invalid UTF-8 string is provided as an insertion string.InsertionIndexNotModifiedWhenInvalidUtf8StringProvided
: This test checks that the insertion string at the specified index remains unchanged when an invalid UTF-8 string is provided.InvalidUtf8InsertionStringOutOfRange
: This test ensures that an error is raised when attempting to set an invalid UTF-8 string at an out-of-range index.InsertionIndexNotModifiedWhenOutOfRangeIndexProvided
: This test verifies that the insertion string at a valid index remains unchanged when an out-of-range index is provided for an invalid UTF-8 string.InsertionIndexNotModifiedWhenInRangeButNotAssigned
: This test confirms that an unassigned insertion string at a valid index returnsnullptr
.