mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
(main): Add tests for -copy and -mutableCopy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1829 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dd0663c18a
commit
1d5e40fb29
1 changed files with 9 additions and 1 deletions
|
@ -15,10 +15,18 @@ print_string(NSString* s)
|
|||
int main()
|
||||
{
|
||||
id s = @"This is a test string";
|
||||
id s2;
|
||||
id s2, s3;
|
||||
|
||||
print_string(s);
|
||||
|
||||
s2 = [s copy];
|
||||
print_string(s2);
|
||||
s3 = [s2 mutableCopy];
|
||||
[s2 release];
|
||||
s2 = [s3 copy];
|
||||
[s3 release];
|
||||
[s2 release];
|
||||
|
||||
s2 = [s copyWithZone: NS_NOZONE];
|
||||
print_string(s2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue