mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Remove Windows Include and correctly release thread obj
This commit is contained in:
parent
80c3d66677
commit
3c3417fabe
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
#import "ObjectTesting.h"
|
||||
#include <winerror.h>
|
||||
#import <Foundation/NSThread.h>
|
||||
|
||||
#if defined(_WIN32) && (NTDDI_VERSION >= NTDDI_WIN10_RS1)
|
||||
|
@ -19,11 +18,12 @@ int main(void)
|
|||
HRESULT hr = SetThreadDescription(current, L"Test");
|
||||
PASS(SUCCEEDED(hr), "SetThreadDescription was successful");
|
||||
|
||||
NSString *name = [[[NSThread alloc] init] name];
|
||||
NSThread *thread = [[NSThread alloc] init];
|
||||
NSString *name = [thread name];
|
||||
PASS(name != nil, "-[NSThread name] returns a valid string");
|
||||
NSLog(@"Name: %@", name);
|
||||
PASS([name isEqualToString: @"Test"], "Thread name is correct");
|
||||
[name release];
|
||||
[thread release];
|
||||
|
||||
[[NSThread currentThread] setName: @"Test2"];
|
||||
name = [[NSThread currentThread] name];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue