<commit_before>//
//  ArmorTestKit.swift
//  Pledges
//
//  Created by <NAME> on 1/24/15.
//  Copyright (c) 2015 Armoria Software. All rights reserved.
//
import XCTest

public func assertEquals <T : Equatable> (_ expected: T, actual:T?, file: StaticString = #file, line: UInt = #line ) {
    XCTAssert(expected == actual, "Expected: \(expected) was not: \(String(describing: actual))", file: file, line: line)
}

public func assertEquals <T : Equatable> (_ expected: T, _ actual:T, file: StaticString = #file, line: UInt = #line ) where T : CustomStringConvertible {
    XCTAssert(expected == actual, "Expected: \(expected.description) was not: \(actual.description)", file: file, line: line)
}

public func assertEquals <T : Equatable> (_ expected: T, _ actual:T?, file: StaticString = #file, line: UInt = #line ) where T : CustomStringConvertible {
    XCTAssert(expected == actual, "Expected: \(expected.description) was not: \(String(describing: actual?.description ?? nil))", file: file, line: line)
}

public func assertEquals <T : Equatable, K> (_ expected: T, _ actual:K , file: StaticString = #file, line: UInt = #line ) {
    if let checkedActual = actual as? T {
        XCTAssert(expected == checkedActual, "Expected: \(expected) was not: \(checkedActual)", file: file, line: line)
    } else {
        XCTFail("These were not of the same type \(expected) \(actual).", file: file, line: line)
    }
}

public func assertEquals <T : Equatable, K> (_ expected: T, _ actual:K? , file: StaticString = #file, line: UInt = #line ) {
    if let checkedActual = actual as? T {
        XCTAssert(expected == checkedActual, "Expected: \(expected) was not: \(checkedActual)", file: file, line: line)
    } else {
        XCTFail("These were not of the same type \(expected) \(String(describing: actual)).", file: file, line: line)
    }
}

public func assertSame <T : AnyObject> (_ expected: T, _ actual: T, file: StaticString = #file, line: UInt = #line ) {
    XCTAssert(expected === actual, "Expected: \(expected) was not: \(actual)", file: file, line: line)
}

public func assertSame <T : AnyObject, K> (_ expected: T, _ actual: K!, file: StaticString = #file, line: UInt = #line ) {
    if let checkedActual = actual as? T {
        XCTAssert(expected === checkedActual, "Expected: \(expected) was not: \(checkedActual)", file: file, line: line)
    } else {
        XCTFail("These were not of the same type. Expected: \(expected) Actual: \(actual)", file: file, line: line)
    }<commit_msg>Updating to swift 4.2, fixing warnings<commit_after>//
//  ArmorTestKit.swift
//  Pledges
//
//  Created by <NAME> on 1/24/15.
//  Copyright (c) 2015 Armoria Software. All rights reserved.
//
import XCTest

public func assertEquals <T : Equatable> (_ expected: T, actual:T?, file: StaticString = #file, line: UInt = #line ) {
    XCTAssert(expected == actual, "Expected: \(expected) was not: \(String(describing: actual))", file: file, line: line)
}

public func assertEquals <T : Equatable> (_ expected: T, _ actual:T, file: StaticString = #file, line: UInt = #line ) where T : CustomStringConvertible {
    XCTAssert(expected == actual, "Expected: \(expected.description) was not: \(actual.description)", file: file, line: line)
}

public func assertEquals <T : Equatable> (_ expected: T, _ actual:T?, file: StaticString = #file, line: UInt = #line ) where T : CustomStringConvertible {
    XCTAssert(expected == actual, "Expected: \(expected.description) was not: \(String(describing: actual?.description ?? nil))", file: file, line: line)
}

public func assertEquals <T : Equatable, K> (_ expected: T, _ actual:K , file: StaticString = #file, line: UInt = #line ) {
    if let checkedActual = actual as? T {
        XCTAssert(expected == checkedActual, "Expected: \(expected) was not: \(checkedActual)", file: file, line: line)
    } else {
        XCTFail("These were not of the same type \(expected) \(actual).", file: file, line: line)
    }
}

public func assertEquals <T : Equatable, K> (_ expected: T, _ actual:K? , file: StaticString = #file, line: UInt = #line ) {
    if let checkedActual = actual as? T {
        XCTAssert(expected == checkedActual, "Expected: \(expected) was not: \(checkedActual)", file: file, line: line)
    } else {
        XCTFail("These were not of the same type \(expected) \(String(describing: actual)).", file: file, line: line)
    }
}

public func assertSame <T : AnyObject> (_ expected: T, _ actual: T, file: StaticString = #file, line: UInt = #line ) {
    XCTAssert(expected === actual, "Expected: \(expected) was not: \(actual)", file: file, line: line)
}

public func assertSame <T : AnyObject, K> (_ expected: T, _ actual: K!, file: StaticString = #file, line: UInt = #line ) {
    if let checkedActual = actual as? T {
        XCTAssert(expected === checkedActual, "Expected: \(expected) was not: \(checkedActual)", file: file, line: line)
    } else {
        XCTFail("These were not of the same type. Expected: \(expected) Actual: \(String(describing: actual))", file: file, line: line)
    }
{'fraction_non_alphanumeric': 0.1505056513979774, 'fraction_numerical': 0.00396589331746976, 'mean_word_length': 3.8687258687258685, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4488424', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1546, 'n_words': 546}