-
-
Save laevandus/7513639004edb7b058e167614e8703f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testStoreAndLoadAsync() async throws { | |
let identifier = try await dataStore.storeData({ "Data".data(using: .utf8) }, identifier: "abc") | |
XCTAssertEqual(identifier, "abc") | |
let string = await dataStore.loadData(forIdentifier: "abc", dataTransformer: { String(decoding: $0, as: UTF8.self) }) | |
XCTAssertEqual(string, "Data") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment