mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
More leak fixes
This commit is contained in:
parent
d68e8be8ee
commit
5b46efa8cd
14 changed files with 65 additions and 55 deletions
|
@ -69,15 +69,12 @@ int main()
|
|||
[dflts setVolatileDomain: domain
|
||||
forName: @"GSTestDomain"];
|
||||
# endif
|
||||
id testObj = [[NSRegularExpression alloc] initWithPattern: @"^a"
|
||||
options: 0
|
||||
error: NULL];
|
||||
id testObj = AUTORELEASE([[NSRegularExpression alloc]
|
||||
initWithPattern: @"^a" options: 0 error: NULL]);
|
||||
|
||||
test_NSObject(@"NSRegularExpression",
|
||||
[NSArray arrayWithObject:
|
||||
[[NSRegularExpression alloc] initWithPattern: @"^a"
|
||||
options: 0
|
||||
error: NULL]]);
|
||||
[NSArray arrayWithObject: AUTORELEASE([[NSRegularExpression
|
||||
alloc] initWithPattern: @"^a" options: 0 error: NULL])]);
|
||||
test_NSCopying(@"NSRegularExpression",@"NSRegularExpression",
|
||||
[NSArray arrayWithObject:testObj],NO,NO);
|
||||
|
||||
|
@ -138,10 +135,8 @@ int main()
|
|||
PASS_EQUAL(replacement, @"c",
|
||||
"Custom replacement: Returns correct replacement");
|
||||
|
||||
NSRegularExpression *testObj2 =
|
||||
[[NSRegularExpression alloc] initWithPattern: @"bc"
|
||||
options: 0
|
||||
error: NULL];
|
||||
NSRegularExpression *testObj2 = AUTORELEASE([[NSRegularExpression alloc]
|
||||
initWithPattern: @"bc" options: 0 error: NULL]);
|
||||
r = [testObj2 firstMatchInString: @"abcdeabcde"
|
||||
options: 0
|
||||
range: NSMakeRange(5, 5)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue