Skip to content
Snippets Groups Projects
Select Git revision
  • 5945869ce3c5900079269bd503005fed2d66a544
  • main default protected
  • dev protected
  • hotfixes-oct-2022
  • refactor/avatar-cell
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1
  • 1.0.8
  • 1.0.7
  • 1.0.6
12 results

MockNetworkMonitor.swift

Blame
  • SetLogLevel.swift 574 B
    import Bindings
    import XCTestDynamicOverlay
    
    public struct SetLogLevel {
      public var run: (LogLevel) throws -> Bool
    
      public func callAsFunction(_ logLevel: LogLevel) throws -> Bool {
        try run(logLevel)
      }
    }
    
    extension SetLogLevel {
      public static let live = SetLogLevel { logLevel in
        var error: NSError?
        let result = BindingsLogLevel(logLevel.rawValue, &error)
        if let error = error {
          throw error
        }
        return result
      }
    }
    
    extension SetLogLevel {
      public static let unimplemented = SetLogLevel(
        run: XCTUnimplemented("\(Self.self)")
      )
    }