Add SPM test target, rename tests to .mm for C++
Doesn't link yet though, need to check why.
This commit is contained in:
parent
4f2f851762
commit
4c51a48aa7
5 changed files with 21 additions and 13 deletions
|
@ -38,6 +38,14 @@ let package = Package(
|
||||||
"-fmodules", "-fcxx-modules"
|
"-fmodules", "-fcxx-modules"
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
),
|
||||||
|
.testTarget(
|
||||||
|
name: "OLMKitTests",
|
||||||
|
dependencies: [ "OLMKit", "libolm" ],
|
||||||
|
path: "xcode/OLMKitTests",
|
||||||
|
cSettings: [
|
||||||
|
.headerSearchPath(".."),
|
||||||
|
]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
cLanguageStandard: .c99,
|
cLanguageStandard: .c99,
|
||||||
|
|
|
@ -119,16 +119,16 @@
|
||||||
XCTAssertEqual(messageIndex, 0);
|
XCTAssertEqual(messageIndex, 0);
|
||||||
|
|
||||||
// export the keys
|
// export the keys
|
||||||
NSString *export = [session1 exportSessionAtMessageIndex:0 error:&error];
|
NSString *cexport = [session1 exportSessionAtMessageIndex:0 error:&error];
|
||||||
|
|
||||||
XCTAssertNil(error);
|
XCTAssertNil(error);
|
||||||
XCTAssertGreaterThan(export.length, 0);
|
XCTAssertGreaterThan(cexport.length, 0);
|
||||||
|
|
||||||
// free the old session to check there is no shared data
|
// free the old session to check there is no shared data
|
||||||
session1 = nil;
|
session1 = nil;
|
||||||
|
|
||||||
// import the keys into another inbound group session
|
// import the keys into another inbound group session
|
||||||
OLMInboundGroupSession *session2 = [[OLMInboundGroupSession alloc] initInboundGroupSessionWithImportedSession:export error:&error];
|
OLMInboundGroupSession *session2 = [[OLMInboundGroupSession alloc] initInboundGroupSessionWithImportedSession:cexport error:&error];
|
||||||
|
|
||||||
XCTAssertNil(error);
|
XCTAssertNil(error);
|
||||||
XCTAssert(session2);
|
XCTAssert(session2);
|
Loading…
Reference in a new issue