text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```swift import Foundation // Adapted from path_to_url /** Finds files on the file system using pattern matching. */ final class Glob: Collection { /** * Different glob implementations have different behaviors, so the behavior of this * implementation is customizable. */ struct Behavior { ...
/content/code_sandbox/Generator/Sources/CLI/Glob.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
1,242
```swift let version = "2.0.0" ```
/content/code_sandbox/Generator/Sources/CLI/Version.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
11
```swift import Foundation final class Logger { enum LogLevel: Comparable { case verbose case info case error } static let shared = Logger() var logLevel: LogLevel = .info private init() {} func log(_ level: LogLevel, message: [Any], separator: String = " ") { ...
/content/code_sandbox/Generator/Sources/CLI/Logger.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
121
```swift import Foundation import ArgumentParser import TOMLKit import FileKit @main @available(macOS 12, *) struct GenerateCommand: AsyncParsableCommand { static var configuration = CommandConfiguration( commandName: "Generate", abstract: "Cuckoo CLI tool for generating mocks according to the spec...
/content/code_sandbox/Generator/Sources/CLI/GenerateCommand.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
1,472
```swift import Foundation import FileKit final class Module { static var overriddenOutput: String? let name: String let imports: [String] let testableImports: [String] let sources: [Path]? let exclude: [String] let regex: String? let output: String let filenameFormat: String? ...
/content/code_sandbox/Generator/Sources/CLI/Module.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
1,208
```swift import ProjectDescription public enum PlatformType: String { case iOS case macOS case tvOS public var platform: Platform { switch self { case .iOS: return .iOS case .macOS: return .macOS case .tvOS: return .tvOS } ...
/content/code_sandbox/Tuist/ProjectDescriptionHelpers/PlatformType.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
239
```swift import ProjectDescription public extension Optional<Environment.Value> { func requireString(message: String) -> String { if case .string(let value) = self { return value } else { fatalError(message) } } func requireBool(message: String) -> Bool { ...
/content/code_sandbox/Tuist/ProjectDescriptionHelpers/Environment+convenience.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
90
```swift import Foundation public func shell(_ command: String) -> String { let task = Process() let pipe = Pipe() task.standardOutput = pipe task.standardError = pipe task.arguments = ["-c", command] task.launchPath = "/bin/zsh" task.standardInput = nil task.launch() let data = p...
/content/code_sandbox/Tuist/ProjectDescriptionHelpers/shell.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
111
```swift import ProjectDescription extension Target { public var reference: TargetReference { TargetReference(stringLiteral: name) } } ```
/content/code_sandbox/Tuist/ProjectDescriptionHelpers/Target+reference.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
27
```objective-c #ifndef Cuckoo_BridgingHeader_h #define Cuckoo_BridgingHeader_h #import <OCMock/OCMock.h> #import "NSInvocation+OCMockWrapper.h" #import "ObjectiveCatcher.h" #import "OCMockObject+Workaround.h" #import "NSObject+TrustMe.h" #import "OCMockObject+CuckooMockObject.h" #import "StringProxy.h" #endif /* Cuck...
/content/code_sandbox/OCMock/Cuckoo-BridgingHeader.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
94
```swift public class Stubber<MOCK> { public func when<OUT>(_ invocation: @autoclosure () -> OUT) -> StubRecorder<OUT> { OCMMacroState.beginStubMacro() _ = invocation() let recorder = OCMMacroState.endStubMacro() return StubRecorder(recorder: recorder!) } } ```
/content/code_sandbox/OCMock/Stubber.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
72
```swift /** * Objective-C equivalent to Cuckoo's own `stub` for protocols. * - parameter type: Type for which to create a mock. (e.g. `UITableViewDelegate.self`) * - parameter stubbing: Closure that takes a `Stubber` object along with an object of specified type. (usage: `stubber.when(mock.METHOD).then...`) */ pub...
/content/code_sandbox/OCMock/ObjectiveStub.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
335
```swift #if canImport(XCTest) import XCTest import OCMock extension XCTestCase { /** * Objective-C equivalent to Cuckoo's own `verify`. * - parameter invocation: Autoclosured invocation of the method/variable that is being verified. * - parameter quantifier: Verification to assert how many times th...
/content/code_sandbox/OCMock/ObjectiveVerify.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
218
```swift import Foundation import FileKit import XcodeProj import Rainbow final class Generator { typealias TokenFilter = (Token) -> Bool struct GeneratedFile { let path: Path let contents: String } static func generate(for module: Module, verbose: Bool) async throws -> [Generated...
/content/code_sandbox/Generator/Sources/CLI/Generator.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
2,010
```swift #if canImport(XCTest) import XCTest public func objectiveAssertThrows<OUT>( message: String = "Expected the method to throw.", file: StaticString = #file, line: UInt = #line, errorHandler: (Error) -> Void = { _ in }, _ invocation: @autoclosure @escaping () -> OUT ) { do { try O...
/content/code_sandbox/OCMock/ObjectiveAssertThrows.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
120
```swift public class StubRecorder<OUT> { private let recorder: OCMStubRecorder public init(recorder: OCMStubRecorder) { self.recorder = recorder } public func thenThrow(_ error: Error) { let exception = NSException(name: NSExceptionName(rawValue: error.localizedDescription), reason: e...
/content/code_sandbox/OCMock/StubRecorder.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
551
```swift import Foundation // MARK: Closures without any return value public func objectiveArgumentClosure<IN1>(from: Any) -> (IN1) -> Void { return { in1 in var arg = from let block = UnsafeRawPointer(&arg).assumingMemoryBound(to: (@convention(block) (NSObject) -> Void).self).pointee let ...
/content/code_sandbox/OCMock/ObjectiveArgumentClosure.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
1,107
```swift import Foundation import CoreGraphics public protocol NSValueConvertible { func toNSValue() -> NSValue } extension Optional: NSValueConvertible where Wrapped: NSValueConvertible { public func toNSValue() -> NSValue { if let value = self { return value.toNSValue() } else { ...
/content/code_sandbox/OCMock/NSValueConvertible.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
769
```objective-c #ifndef ObjectiveCatcher_h #define ObjectiveCatcher_h #import <Foundation/Foundation.h> @interface ObjectiveCatcher: NSObject + (BOOL)catchException:(void(^)(void))tryBlock error:(__autoreleasing NSError **)error; @end #endif /* ObjectiveCatcher_h */ ```
/content/code_sandbox/OCMock/ObjCHelpers/ObjectiveCatcher.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
58
```swift import Foundation /// Used as an Objective-C matcher matching any Objective-C closure. public func objcAny<T: NSObject>() -> T { return TrustMe<T>.onThis(OCMArg.any() as Any) } /// Used as an Objective-C matcher matching any Objective-C closure. public func objcAny() -> String { return TrustMe<NSStri...
/content/code_sandbox/OCMock/ObjectiveMatchers.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
1,222
```objective-c #import "OCMockObject+CuckooMockObject.h" @implementation CuckooMockObject - (id)initWithMockObject:(id)aMockObject { mockObject = aMockObject; return self; } - (id)mockObject { return mockObject; } - (void)forwardInvocation:(NSInvocation *)invocation { if ([[OCMMacroState globalStat...
/content/code_sandbox/OCMock/ObjCHelpers/OCMockObject+CuckooMockObject.m
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
316
```objective-c #import <OCMock/OCMock.h> NS_ASSUME_NONNULL_BEGIN @interface OCMockObject (Workaround) + (id)mockForWorkaroundProtocol:(id)aProtocol; @end NS_ASSUME_NONNULL_END ```
/content/code_sandbox/OCMock/ObjCHelpers/OCMockObject+Workaround.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
45
```objective-c #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface TrustMe <T>: NSObject + (T)onThis:(id)object; @end @interface TrustHim : NSObject + (void*)onThis:(id)block; @end NS_ASSUME_NONNULL_END ```
/content/code_sandbox/OCMock/ObjCHelpers/NSObject+TrustMe.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
57
```objective-c #import "NSObject+TrustMe.h" #import <OCMock/OCMock.h> @implementation TrustMe + (id)onThis:(id)object { return object; } @end @implementation TrustHim + (void*)onThis:(id)block { return (__bridge void * _Nonnull)(block); } @end ```
/content/code_sandbox/OCMock/ObjCHelpers/NSObject+TrustMe.m
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
69
```objective-c #import <Foundation/Foundation.h> #import <OCMock/OCMConstraint.h> NS_ASSUME_NONNULL_BEGIN @interface StringProxy: NSObject//: NSProxy - (instancetype)initWithConstraint:(id)aConstraint; @end NS_ASSUME_NONNULL_END ```
/content/code_sandbox/OCMock/ObjCHelpers/StringProxy.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
48
```objective-c #import <OCMock/OCMock.h> NS_ASSUME_NONNULL_BEGIN @interface CuckooMockObject : NSProxy { id mockObject; } - (id)initWithMockObject:(id)aMockObject; - (id)mockObject; @end NS_ASSUME_NONNULL_END ```
/content/code_sandbox/OCMock/ObjCHelpers/OCMockObject+CuckooMockObject.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
58
```objective-c #import "OCMockObject+Workaround.h" @implementation OCMockObject (Workaround) + (id)mockForWorkaroundProtocol:(id)aProtocol { return [self mockForProtocol:aProtocol]; } @end ```
/content/code_sandbox/OCMock/ObjCHelpers/OCMockObject+Workaround.m
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
47
```objective-c #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface NSInvocation (OCMockWrapper) - (NSArray*)arguments; - (void)setReturnNSValue:(NSValue*)returnValue; @end NS_ASSUME_NONNULL_END ```
/content/code_sandbox/OCMock/ObjCHelpers/NSInvocation+OCMockWrapper.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
46
```objective-c #import "NSInvocation+OCMockWrapper.h" #import <OCMock/OCMFunctions.h> BOOL OCMEqualTypesAllowingOpaqueStructs(const char *type1, const char *type2); @interface NSValue(OCMAdditions) - (BOOL)getBytes:(void *)outputBuf objCType:(const char *)targetType; @end @implementation NSInvocation (OCMockWrappe...
/content/code_sandbox/OCMock/ObjCHelpers/NSInvocation+OCMockWrapper.m
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
546
```objective-c #import "ObjectiveCatcher.h" @implementation ObjectiveCatcher + (BOOL)catchException:(void(^)(void))tryBlock error:(__autoreleasing NSError **)error { @try { tryBlock(); return YES; } @catch (NSException *exception) { *error = [[NSError alloc] initWithDomain:exceptio...
/content/code_sandbox/OCMock/ObjCHelpers/ObjectiveCatcher.m
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
90
```objective-c #import "StringProxy.h" @implementation StringProxy { NSString *string; OCMConstraint *constraint; } - (instancetype)initWithConstraint:(id)aConstraint { NSUInteger length = 2048; NSMutableString* str = [[NSMutableString alloc] initWithCapacity: length]; for (NSUInteger i = 0; i < ...
/content/code_sandbox/OCMock/ObjCHelpers/StringProxy.m
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
408
```objective-c // // Cuckoo.h // Cuckoo // // Created by Tadeas Kriz on 13/01/16. // #import <Foundation/Foundation.h> //! Project version number for Cuckoo. FOUNDATION_EXPORT double CuckooVersionNumber; //! Project version string for Cuckoo. FOUNDATION_EXPORT const unsigned char CuckooVersionString[]; // In thi...
/content/code_sandbox/Source/Cuckoo.h
objective-c
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
106
```swift internal func getterName(_ property: String) -> String { return property + "#get" } internal func setterName(_ property: String) -> String { return property + "#set" } public func wrap<M: Matchable, IN>(matchable: M, mapping: @escaping (IN) -> M.MatchedType) -> ParameterMatcher<IN> { return Param...
/content/code_sandbox/Source/Utils.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
175
```swift public class DefaultValueRegistry { private static let defaultRegisteredTypes: [ObjectIdentifier: Any] = [ ObjectIdentifier(Void.self): Void(), ObjectIdentifier(Int.self): Int(), ObjectIdentifier(Int8.self): Int8(), ObjectIdentifier(Int16.self): Int16(), ObjectI...
/content/code_sandbox/Source/DefaultValueRegistry.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
1,002
```swift /// Starts the stubbing for the given mock. Can be used multiple times. public func stub<M: Mock>(_ mock: M, block: (M.Stubbing) -> Void) { block(mock.getStubbingProxy()) } /// Used in stubbing. Currently only returns passed function but this may change in the future so it is not recommended to omit it. p...
/content/code_sandbox/Source/CuckooFunctions.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
359
```swift extension Array: Matchable where Element: Matchable, Element == Element.MatchedType { public typealias MatchedType = [Element] public var matcher: ParameterMatcher<[Element]> { return ParameterMatcher<[Element]> { other in guard self.count == other.count else { return false } ...
/content/code_sandbox/Source/Matching/Array+matchers.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
2,965
```swift #if canImport(XCTest) import XCTest #endif public class MockManager { public static var fail: ((message: String, sourceLocation: SourceLocation)) -> Void = { arg in let (message, sourceLocation) = arg #if canImport(XCTest) XCTFail(message, file: sourceLocation.file, line: sourceLoc...
/content/code_sandbox/Source/MockManager.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
3,957
```swift /// ParameterMatcher matches parameters of methods in stubbing and verification. public struct ParameterMatcher<T>: Matchable { private let matchesFunction: (T) -> Bool public init(matchesFunction: @escaping (T) -> Bool = { _ in true }) { self.matchesFunction = matchesFunction } ...
/content/code_sandbox/Source/Matching/ParameterMatcher.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
232
```swift /// CallMatcher is used in verification to assert how many times was the call made. It can also be used to do different asserts on stub calls matched with parameter matchers. public struct CallMatcher { public let name: String private let matchesFunction: ([StubCall]) -> Bool public init(...
/content/code_sandbox/Source/Matching/CallMatcher.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
299
```swift extension Set: Matchable where Element: Matchable, Element == Element.MatchedType { public typealias MatchedType = Set<Element> public var matcher: ParameterMatcher<Set<Element>> { return ParameterMatcher<Set<Element>> { other in return self == other } } } ```
/content/code_sandbox/Source/Matching/Set+matchers.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
64
```swift /// Returns a matcher ensuring a call was made **`count`** times. public func times(_ count: Int) -> CallMatcher { let name = count == 0 ? "never" : "\(count) times" return CallMatcher(name: name, numberOfExpectedCalls: count, compareCallsFunction: ==) } /// Returns a matcher ensuring no call was made...
/content/code_sandbox/Source/Matching/CallMatcherFunctions.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
233
```swift /** Matchable can be anything that can produce its own parameter matcher. It is used instead of concrete value for stubbing and verification. */ public protocol Matchable { associatedtype MatchedType /// Matcher for this instance. This should be an equalTo type of a matcher, but it is not ...
/content/code_sandbox/Source/Matching/Matchable.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
915
```swift /// Returns an equality matcher. public func equal<T: Equatable>(to value: T) -> ParameterMatcher<T> { return equal(to: value, equalWhen: ==) } /// Returns an identity matcher. @available(*, renamed: "sameInstance(as:)") public func equal<T: AnyObject>(to value: T) -> ParameterMatcher<T> { return equa...
/content/code_sandbox/Source/Matching/ParameterMatcherFunctions.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
3,201
```swift import Foundation internal class ThreadLocal<T> { private let dictionaryKey = "ThreadLocal.\(UUID().uuidString)" internal var value: T? { get { let dictionary = Thread.current.threadDictionary if let storedValue = dictionary[dictionaryKey] { guard let t...
/content/code_sandbox/Source/Initialization/ThreadLocal.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
202
```swift import Foundation public class MockBuilder { private let manager: MockManager init(manager: MockManager) { self.manager = manager } public func enableSuperclassSpy() { manager.enableSuperclassSpy() } public func enableDefaultStubImplementation() { manager.enab...
/content/code_sandbox/Source/Initialization/MockBuilder.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
70
```swift import Foundation extension MockManager { internal static let preconfiguredManagerThreadLocal = ThreadLocal<MockManager>() public static var preconfiguredManager: MockManager? { return preconfiguredManagerThreadLocal.value } } ```
/content/code_sandbox/Source/Initialization/MockManager+preconfigured.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
48
```swift import Foundation public func createMock<MOCKED: Mocked>(for mockedType: MOCKED.Type, configuration: (MockBuilder, MOCKED.MockType.Stubbing) -> MOCKED.MockType) -> MOCKED.MockType { return createMock(MOCKED.MockType.self, configuration: configuration) } public func createMock<MOCK: Mock>(_ mockType: MOCK...
/content/code_sandbox/Source/Initialization/CreateMock.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
173
```swift /// Marker struct for use as a return type in verification. public struct __DoNotUse<IN, OUT> { } public extension __DoNotUse { /// Hint at the return type when verifying a function where the function is generic /// and the type is inferred from the return value func with(returnType: OUT.Type) { ...
/content/code_sandbox/Source/Verification/__DoNotUse.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
74
```swift // Can be used to capture arguments. It is recommended to use it only in verification and not stubbing. public class ArgumentCaptor<T> { // Last captured argument if any. public var value: T? { return allValues.last } // All captured arguments. public private(set) var allV...
/content/code_sandbox/Source/Verification/ArgumentCaptor.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
129
```swift public struct VerifyReadOnlyProperty<T> { private let manager: MockManager private let name: String private let callMatcher: CallMatcher private let sourceLocation: SourceLocation @discardableResult public func get() -> __DoNotUse<Void, T> { return manager.verify(getterName(nam...
/content/code_sandbox/Source/Verification/VerifyProperty/VerifyReadOnlyProperty.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
154
```swift public struct VerifyProperty<T> { private let manager: MockManager private let name: String private let callMatcher: CallMatcher private let sourceLocation: SourceLocation @discardableResult public func get() -> __DoNotUse<Void, T> { return manager.verify(getterName(name), call...
/content/code_sandbox/Source/Verification/VerifyProperty/VerifyProperty.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
440
```swift extension Dictionary: Matchable where Value: Matchable, Value == Value.MatchedType { public typealias MatchedType = [Key: Value] public var matcher: ParameterMatcher<[Key: Value]> { return ParameterMatcher<[Key: Value]> { other in guard self.count == other.count else { return false...
/content/code_sandbox/Source/Matching/Dictionary+matchers.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
3,135
```swift enum StubAction<IN, OUT> { case callImplementation((IN) throws -> OUT) case returnValue(OUT) case throwError(Error) case callRealImplementation } ```
/content/code_sandbox/Source/Stubbing/StubAction.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
39
```swift public protocol Stub { var method: String { get } } public class ConcreteStub<IN, OUT>: Stub { public let method: String let parameterMatchers: [ParameterMatcher<IN>] var actions: [StubAction<IN, OUT>] = [] init(method: String, parameterMatchers: [ParameterMatcher<IN>]) { self...
/content/code_sandbox/Source/Stubbing/Stub.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
135
```swift public protocol StubCall { var method: String { get } var parametersAsString: String { get } } public struct ConcreteStubCall<IN>: StubCall { public let method: String public let parameters: (IN) public var parametersAsString: String { let string = String(describing: parameter...
/content/code_sandbox/Source/Stubbing/StubCall.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
181
```swift // // ToBeStubbedThrowingProperty.swift // Cuckoo // // Created by Kabir Oberai on 2023-03-27. // public protocol ToBeStubbedThrowingProperty { associatedtype GetterType: StubThrowingFunction var get: GetterType { get } } public struct ProtocolToBeStubbedThrowingProperty<MOCK: ProtocolMock, T>: T...
/content/code_sandbox/Source/Stubbing/ToBeStubbedProperty/ToBeStubbedThrowingProperty.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
303
```swift public protocol ToBeStubbedReadOnlyProperty { associatedtype GetterType: StubFunction var get: GetterType { get } } public struct ProtocolToBeStubbedReadOnlyProperty<MOCK: ProtocolMock, T>: ToBeStubbedReadOnlyProperty { private let manager: MockManager private let name: String public...
/content/code_sandbox/Source/Stubbing/ToBeStubbedProperty/ToBeStubbedReadOnlyProperty.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
252
```swift public protocol ToBeStubbedProperty: ToBeStubbedReadOnlyProperty where GetterType.OutputType == SetterType.InputType { associatedtype SetterType: StubNoReturnFunction func set<M: Matchable>(_ matcher: M) -> SetterType where M.MatchedType == SetterType.InputType } public struct ProtocolToBeStubbedProp...
/content/code_sandbox/Source/Stubbing/ToBeStubbedProperty/ToBeStubbedProperty.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
832
```swift public protocol StubThrowingFunction: StubFunctionThenTrait, StubFunctionThenReturnTrait, StubFunctionThenThrowTrait, StubFunctionThenThrowingTrait { } public struct ProtocolStubThrowingFunction<IN, OUT>: StubThrowingFunction { public let stub: ConcreteStub<IN, OUT> public init(stub: ConcreteStub<IN,...
/content/code_sandbox/Source/Stubbing/StubFunction/StubThrowingFunction.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
146
```swift public protocol StubFunction: StubFunctionThenTrait, StubFunctionThenReturnTrait { } public struct ProtocolStubFunction<IN, OUT>: StubFunction { public let stub: ConcreteStub<IN, OUT> public init(stub: ConcreteStub<IN, OUT>) { self.stub = stub } } public struct ClassStubFunction<IN, OUT>...
/content/code_sandbox/Source/Stubbing/StubFunction/StubFunction.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
123
```swift public protocol StubNoReturnFunction: StubFunctionThenTrait, StubFunctionThenDoNothingTrait { } public struct ProtocolStubNoReturnFunction<IN>: StubNoReturnFunction { public let stub: ConcreteStub<IN, Void> public init(stub: ConcreteStub<IN, Void>) { self.stub = stub } } public struc...
/content/code_sandbox/Source/Stubbing/StubFunction/StubNoReturnFunction.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
131
```swift public protocol StubNoReturnThrowingFunction: StubFunctionThenTrait, StubFunctionThenDoNothingTrait, StubFunctionThenThrowTrait, StubFunctionThenThrowingTrait { } public struct ProtocolStubNoReturnThrowingFunction<IN>: StubNoReturnThrowingFunction { public let stub: ConcreteStub<IN, Void> public init...
/content/code_sandbox/Source/Stubbing/StubFunction/StubNoReturnThrowingFunction.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
153
```swift public protocol StubFunctionThenThrowTrait: BaseStubFunctionTrait { /// Throws `error` when invoked. func thenThrow(_ error: Error, _ errors: Error...) -> Self } public extension StubFunctionThenThrowTrait { @discardableResult func thenThrow(_ error: Error, _ errors: Error...) -> Self { ...
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/StubFunctionThenThrowTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
102
```swift public protocol StubFunctionThenTrait: BaseStubFunctionTrait { /// Invokes `implementation` when invoked. func then(_ implementation: @escaping (InputType) -> OutputType) -> Self } public extension StubFunctionThenTrait { @discardableResult func then(_ implementation: @escaping (InputType) -> ...
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/StubFunctionThenTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
92
```swift public protocol StubFunctionThenReturnTrait: BaseStubFunctionTrait { /// Returns `output` when invoked. func thenReturn(_ output: OutputType, _ outputs: OutputType...) -> Self } public extension StubFunctionThenReturnTrait { @discardableResult func thenReturn(_ output: OutputType, _ outputs: O...
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/StubFunctionThenReturnTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
105
```swift public protocol StubFunctionThenDoNothingTrait: BaseStubFunctionTrait { /// Does nothing when invoked. func thenDoNothing() -> Self } public extension StubFunctionThenDoNothingTrait where OutputType == Void { @discardableResult func thenDoNothing() -> Self { stub.appendAction(.retur...
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/StubFunctionThenDoNothingTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
77
```swift public protocol StubFunctionThenThrowingTrait: BaseStubFunctionTrait { /// Invokes throwing `implementation` when invoked. func then(_ implementation: @escaping (InputType) throws -> OutputType) -> Self } public extension StubFunctionThenThrowingTrait { @discardableResult func then(_ implement...
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/StubFunctionThenThrowingTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
99
```swift public protocol StubFunctionThenCallRealImplementationTrait: BaseStubFunctionTrait { /// Invokes real implementation when invoked. func thenCallRealImplementation() -> Self } public extension StubFunctionThenCallRealImplementationTrait { @discardableResult func thenCallRealImplementation() -> ...
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/StubFunctionThenCallRealImplementationTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
78
```swift public protocol BaseStubFunctionTrait { associatedtype InputType associatedtype OutputType var stub: ConcreteStub<InputType, OutputType> { get } } ```
/content/code_sandbox/Source/Stubbing/StubFunction/Trait/BaseStubFunctionTrait.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
36
```swift public protocol StubbingProxy { init(manager: MockManager) } ```
/content/code_sandbox/Source/Mock/StubbingProxy.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
15
```swift public protocol VerificationProxy { init(manager: MockManager, callMatcher: CallMatcher, sourceLocation: SourceLocation) } ```
/content/code_sandbox/Source/Mock/VerificationProxy.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
26
```swift import Foundation public protocol Mocked { associatedtype MockType: Mock } ```
/content/code_sandbox/Source/Mock/Mocked.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
18
```swift public protocol HasMockManager { var cuckoo_manager: MockManager { get } } public protocol HasSuperclass { static var cuckoo_hasSuperclass: Bool { get } } public protocol Mock: HasMockManager, HasSuperclass { associatedtype MocksType associatedtype Stubbing: StubbingProxy associatedtype V...
/content/code_sandbox/Source/Mock/Mock.swift
swift
2016-01-12T14:30:36
2024-08-15T17:36:01
Cuckoo
Brightify/Cuckoo
1,657
340
```json PODS: - BMPlayer/CacheSupport (1.3.0): - BMPlayer/Core - NVActivityIndicatorView (~> 4.7.0) - SnapKit (~> 5.0.0) - VIMediaCache - BMPlayer/Core (1.3.0) - NVActivityIndicatorView (4.7.0): - NVActivityIndicatorView/Presenter (= 4.7.0) - NVActivityIndicatorView/Presenter (4.7.0) - Sna...
/content/code_sandbox/Example/Podfile.lock
json
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
391
```swift // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "BMPlayer", products: [ // Products define the executables and libraries a package produces, and make them visible...
/content/code_sandbox/Package.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
212
```ruby Pod::Spec.new do |s| s.name = "BMPlayer" s.version = "1.3.3" s.summary = "Video Player Using Swift, based on AVPlayer" s.swift_versions = "5" s.description = <<-DESC Video Player Using Swift, based on AVPlayer, support for the horizontal screen, vertical screen, the upper an...
/content/code_sandbox/BMPlayer.podspec
ruby
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
466
```objective-c // // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, su...
/content/code_sandbox/Example/Pods/SwipeBack/SwipeBack/SwipeBack.h
objective-c
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
241
```objective-c // // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, su...
/content/code_sandbox/Example/Pods/SwipeBack/SwipeBack/UIViewController+SwipeBack.h
objective-c
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
238
```objective-c // // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, su...
/content/code_sandbox/Example/Pods/SwipeBack/SwipeBack/UINavigationController+SwipeBack.h
objective-c
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
275
```objective-c // // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, su...
/content/code_sandbox/Example/Pods/SwipeBack/SwipeBack/UINavigationController+SwipeBack.m
objective-c
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
879
```objective-c // // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, su...
/content/code_sandbox/Example/Pods/SwipeBack/SwipeBack/UIViewController+SwipeBack.m
objective-c
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
463
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintDescription.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
529
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintView.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
295
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
419
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintItem.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
431
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
439
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/Debugging.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
1,322
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/Constraint.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
2,140
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
723
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintMaker.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
1,475
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
1,107
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
448
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintDSL.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
1,298
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
566
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
529
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
299
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
305
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
352
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintAttributes.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
1,530
```swift // // SnapKit // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, dist...
/content/code_sandbox/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift
swift
2016-04-28T10:13:42
2024-08-16T13:36:21
BMPlayer
BrikerMan/BMPlayer
1,938
321