Disposal of RegexMatch structures
This commit is contained in:
parent
e6064bd375
commit
0b651b819a
3 changed files with 12 additions and 0 deletions
|
@ -31,6 +31,8 @@ void testLiteral(void)
|
|||
assert(Regex_FirstMatch(®ex, test_string_0, &match) == EXIT_SUCCESS);
|
||||
assert(StringView_Equal(match.match, test_string_0));
|
||||
|
||||
RegexMatch_Destroy(&match);
|
||||
|
||||
Regex_Destroy(®ex);
|
||||
assert(allocator.reserved == 0);
|
||||
Allocator_DestroySystemAllocator(&allocator);
|
||||
|
@ -52,6 +54,8 @@ void testBackslash(void)
|
|||
assert(Regex_FirstMatch(®ex, match_string, &match) == EXIT_SUCCESS);
|
||||
assert(StringView_Equal(match.match, match_string));
|
||||
|
||||
RegexMatch_Destroy(&match);
|
||||
|
||||
Regex_Destroy(®ex);
|
||||
assert(allocator.reserved == 0);
|
||||
Allocator_DestroySystemAllocator(&allocator);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue