33 lines
775 B
Swift
33 lines
775 B
Swift
//
|
|
// Copyright 2019 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
//
|
|
|
|
import Foundation
|
|
import XCTest
|
|
import SignalServiceKit
|
|
|
|
public class PerformanceBaseTest: XCTestCase {
|
|
|
|
// MARK: Hooks
|
|
|
|
func setUpIteration() {
|
|
SetCurrentAppContext(TestAppContext(), true)
|
|
MockSSKEnvironment.activate()
|
|
}
|
|
|
|
// MARK: Helpers
|
|
|
|
public func read(_ block: @escaping (SDSAnyReadTransaction) -> Void) {
|
|
return databaseStorage.read(block: block)
|
|
}
|
|
|
|
public func write(_ block: @escaping (SDSAnyWriteTransaction) -> Void) {
|
|
return databaseStorage.write(block: block)
|
|
}
|
|
|
|
public func asyncWrite(_ block: @escaping (SDSAnyWriteTransaction) -> Void) {
|
|
return databaseStorage.asyncWrite(block: block)
|
|
}
|
|
}
|