Implement -isEqual: and -hash on NSRegularExpression, so that copies are

actually equal


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39871 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2016-06-17 07:43:51 +00:00
parent 491474cbf3
commit ac2d08d2a1
4 changed files with 115 additions and 1 deletions

View file

View file

@ -0,0 +1,22 @@
#import "ObjectTesting.h"
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSRegularExpression.h>
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
id testObj = [[NSRegularExpression alloc] initWithPattern: @"^a"
options: 0
error: NULL];
test_NSObject(@"NSRegularExpression",
[NSArray arrayWithObject:
[[NSRegularExpression alloc] initWithPattern: @"^a"
options: 0
error: NULL]]);
test_NSCopying(@"NSRegularExpression",@"NSRegularExpression",
[NSArray arrayWithObject:testObj],NO,NO);
[arp release]; arp = nil;
return 0;
}