Skip to content

Commit

Permalink
Added XCTAsser(_:isType)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Feb 11, 2021
1 parent 8c80db8 commit d57bdae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/XCTestExtensions/XCTAssert+Types.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Created by Sam Deane on 11/02/21.
// All code (c) 2021 - present day, Elegant Chaos Limited.
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

import XCTest

public func XCTAssert(_ item: Any, isType matching: Any.Type, file: StaticString = #file, line: UInt = #line) {
XCTAssertTrue(type(of: item) == matching, file: file, line: line)
}

0 comments on commit d57bdae

Please sign in to comment.