Merged
Conversation
It seems like we didn't even check whether the operations succeed or not. * `clear_empty()` Add assertion to confirm a newly created autocomplete object is empty. * `find_after_create()`: Add assertion to ensure `autocomplete_complete()` returns NULL when no entries are present in th object.
Writing this test I'm unsure whether a function like string_matches_one_of() should actually call cons_show(). Let's just note that for later.
See last commit with comment regarding cons_show(). In this test here we can see that if we pass NULL cons_show() isn't called. Making it a bit different that other invalid test cases.
Optimize prof_occurrences by using pointer arithmetic and g_utf8_next_char instead of calls to g_utf8_offset_to_pointer. Improve list construction efficiency in prof_occurrences by using g_slist_prepend and g_slist_reverse instead of appends. Also fix a slight oversight that could lead to trouble: When empty search strings (e.g. empty nicks) are passed it caused matches at every position. Update the test case to test for empty nicks.
Also refactor the function so we pass it the current version and don't rely on the define inside of it. This function only allows version format in the style of "x.y.z".
9672dd4 to
549f28f
Compare
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.
No description provided.