mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
Update Objective-C API to be more usable from Swift. E.g., to allow conversion from Objective-C methods with trailing NSError** parameter to throwing Swift methods. Update CMake Objective-C framework setup.
25 lines
494 B
Text
25 lines
494 B
Text
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#import <XCTest/XCTest.h>
|
|
|
|
#import "ort_env.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface ORTEnvTest : XCTestCase
|
|
@end
|
|
|
|
@implementation ORTEnvTest
|
|
|
|
- (void)testInitOk {
|
|
NSError* err = nil;
|
|
ORTEnv* env = [[ORTEnv alloc] initWithLoggingLevel:ORTLoggingLevelWarning
|
|
error:&err];
|
|
XCTAssertNotNil(env);
|
|
XCTAssertNil(err);
|
|
}
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|