Skip to content

keygx/PAssert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAssert

Power Assert inspired Test tool for XCTest by Swift

Image

Requirements

  • Swift 4.0
  • iOS 8.4 or later

Installation

To integrate "PAssert.swift" into your Xcode project Test Target

Usage

Example Test Code

import UIKit
import XCTest

class PAssertSampleTests: XCTestCase {
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // Test MyCalc add()
    func testCalc() {
        
        let calc = MyCalc()
        
        PAssert(calc.add(3, 4), ==, 7)
    }
    
}

Test failure


=== Assertion Failed =============================================
DATE: 2015-08-04 21:04:52
FILE: PAssertSampleTests.swift
LINE: 29
FUNC: testCalc()

=> PAssert(calc.add(3, 4), ==, 7)
           |               |   |
           |               |   7
           |               |
           |               false
           |
           12

License

PAssert is released under the MIT license. See LICENSE for details.

Author

Yukihiko Kagiyama (keygx) https://twitter.com/keygx

About

Power Assert inspired debug tool in Swift

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages