This file contains hidden or 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
| import XCTest | |
| import ReactiveSwift | |
| private let iterations = 1000000 | |
| class DisposablePerfTests: XCTestCase { | |
| func testNewDisposableQuery() { | |
| let d = SimpleDisposable() | |
| measure { |
This file contains hidden or 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
| // | |
| // NSObjectRACSelectorSignalPerformanceTests.m | |
| // ReactiveObjC | |
| // | |
| // Created by Anders on 13/11/2016. | |
| // Copyright © 2016 GitHub. All rights reserved. | |
| // | |
| @import Nimble; |
This file contains hidden or 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
| import Result | |
| import ReactiveSwift | |
| import Foundation | |
| /*: | |
| ## Sandbox | |
| A place where you can build your sand castles 🏖. | |
| */ |
This file contains hidden or 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
| import ReactiveSwift | |
| import enum Result.NoError | |
| public final class Subject<Value, Error: Swift.Error>: SignalProtocol, ObserverProtocol { | |
| private let (_signal, observer) = Signal<Value, Error>.pipe() | |
| public var signal: Signal<Value, Error> { | |
| return _signal | |
| } |
This file contains hidden or 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
| import Quick | |
| import Nimble | |
| import ReactiveSwift | |
| import ReactiveCocoa | |
| import Result | |
| class UISwitchSpec: QuickSpec { | |
| override func spec() { | |
| var toggle: UISwitch! | |
| weak var _toggle: UISwitch? |
This file contains hidden or 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
| import ReactiveSwift | |
| import enum Result.NoError | |
| /// Bidirectional Binding Operator: `<~>` | |
| precedencegroup BidirectionalBinding { | |
| higherThan: AssignmentPrecedence | |
| } | |
| infix operator <~>: BidirectionalBinding |
This file contains hidden or 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 testDismissViewController_via_property() { | |
| let expectation = self.expectation(description: "Expected rac_dismissModally to be triggered") | |
| defer { self.waitForExpectations(timeout: 5, handler: nil) } | |
| let presenting = UIViewController() | |
| presenting.view = UIView(frame: .zero) | |
| let presented = UIViewController() | |
| presented.view = UIView(frame: .zero) |
This file contains hidden or 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
| public enum TypeEncoding: Int8 { | |
| // Integer | |
| case char = 99 | |
| case int = 105 | |
| case short = 115 | |
| case long = 108 | |
| case longLong = 113 | |
| // Unsigned Integer |
This file contains hidden or 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
| // | |
| // Benchmarks.swift | |
| // Benchmarks | |
| // | |
| // Created by Anders on 6/9/2016. | |
| // Copyright © 2016 Ik ben anders. All rights reserved. | |
| // | |
| import XCTest |
This file contains hidden or 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
| // | |
| // Inlining.swift | |
| // Benchmarks | |
| // | |
| // Created by Anders on 13/8/2016. | |
| // Copyright © 2016 Anders. All rights reserved. | |
| // | |
| import XCTest |