Skip to content
Permalink
Browse files

Add macOS tests

  • Loading branch information...
onmyway133 committed May 18, 2019
1 parent 93df841 commit 1648df8af6aafd3f2c5748fd3c55a5cf941e7314
Showing with 6 additions and 22 deletions.
  1. +4 −11 EasyClosureTests/Mac/macOSTests.swift
  2. +2 −11 EasyClosureTests/iOS/iOSTests.swift
@@ -1,4 +1,5 @@
import XCTest
import EasyClosure

class macOSTests: XCTestCase {

@@ -12,16 +13,8 @@ class macOSTests: XCTestCase {
super.tearDown()
}

func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
func testButton() {
let button = NSButton()
button.on.tap {}
}

func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}

}
@@ -1,19 +1,10 @@
import XCTest
@testable import EasyClosure
import EasyClosure

class EasyClosureTests: XCTestCase {

func testButton() {
let button = UIButton()

var called = false
button.on.tap {
called = true
}

button.sendActions(for: .touchUpInside)

wait(for: 0.5)
// XCTAssertTrue(called)
button.on.tap {}
}
}

0 comments on commit 1648df8

Please sign in to comment.
You can’t perform that action at this time.