mirror of
https://github.com/mixpanel/mixpanel-swift
synced 2026-04-21 13:37:18 +00:00
35 lines
727 B
Swift
35 lines
727 B
Swift
//
|
|
// TestConstants.swift
|
|
// MixpanelDemo
|
|
//
|
|
// Created by Yarden Eitan on 6/28/16.
|
|
// Copyright © 2016 Mixpanel. All rights reserved.
|
|
//
|
|
|
|
import XCTest
|
|
|
|
@testable import Mixpanel
|
|
|
|
let kFakeServerUrl = "https://34a272abf23d.com"
|
|
|
|
extension XCTestCase {
|
|
|
|
func XCTExpectAssert(
|
|
_ expectedMessage: String, file: StaticString = #file, line: UInt = #line, block: () -> Void
|
|
) {
|
|
let exp = expectation(description: expectedMessage)
|
|
|
|
Assertions.assertClosure = {
|
|
(condition, message, file, line) in
|
|
if !condition {
|
|
exp.fulfill()
|
|
}
|
|
}
|
|
|
|
// Call code.
|
|
block()
|
|
waitForExpectations(timeout: 0.5, handler: nil)
|
|
Assertions.assertClosure = Assertions.swiftAssertClosure
|
|
}
|
|
|
|
}
|