<commit_before>import Foundation
import XCTest
@testable import Bourne

class BoolTests: XCTestCase {
    func testBoolDecoding() {
        let trueJson = JSON(true)
        let falseJson = JSON(false)

        XCTAssertEqual(trueJson.bool, true)
        XCTAssertEqual(falseJson.bool, false)
    }

    func testBoolIntDecoding() {
        let intFalseJson = JSON(0)
        let intTrueJson = JSON(1)

        XCTAssertEqual(intTrueJson.bool, true)
        XCTAssertEqual(intFalseJson.bool, false)
    }

    func testBoolStringDecoding() {
        let stringTrue = "true"
        let stringFalse = "false"
        
        let trueJson = JSON(stringTrue)
        let falseJson = JSON(stringFalse)

        XCTAssertEqual(trueJson.bool, true)
        XCTAssertEqual(falseJson.bool, false)
        
        XCTAssertNil(JSON("nothing").bool)
    }

    func testBoolThrow() throws {
        let json = JSON([1])
        XCTAssertThrowsError(try Bool.decode(json))
    }

    static var allTests = [
        ("testBoolDecoding", testBoolDecoding),
        ("testBoolIntDecoding", testBoolIntDecoding),
        ("testBoolStringDecoding", testBoolStringDecoding),
    ]
}
<commit_msg>[BoolTests] Check that equality is accurate<commit_after>import Foundation
import XCTest
@testable import Bourne

class BoolTests: XCTestCase {
    func testBoolDecoding() {
        let trueJson = JSON(true)
        let falseJson = JSON(false)

        XCTAssertEqual(trueJson.bool, true)
        XCTAssertEqual(falseJson.bool, false)
    }

    func testBoolIntDecoding() {
        let intFalseJson = JSON(0)
        let intTrueJson = JSON(1)

        XCTAssertEqual(intTrueJson.bool, true)
        XCTAssertEqual(intFalseJson.bool, false)
    }

    func testBoolStringDecoding() {
        let stringTrue = "true"
        let stringFalse = "false"
        
        let trueJson = JSON(stringTrue)
        let falseJson = JSON(stringFalse)

        XCTAssertEqual(trueJson.bool, true)
        XCTAssertEqual(falseJson.bool, false)
        
        XCTAssertNil(JSON("nothing").bool)
    }

    func testBoolThrow() throws {
        let json = JSON([1])
        XCTAssertThrowsError(try Bool.decode(json))
    }

    func testBoolEquality() {
        let trueJson = JSON(true)
        let falseJson = JSON(false)

        XCTAssertEqual(trueJson, JSON(true))
        XCTAssertNotEqual(trueJson, falseJson)
    }

    static var allTests = [
        ("testBoolDecoding", testBoolDecoding),
        ("testBoolIntDecoding", testBoolIntDecoding),
        ("testBoolStringDecoding", testBoolStringDecoding),
        ("testBoolEquality", testBoolEquality),
    ]
}

{'fraction_non_alphanumeric': 0.09242424242424242, 'fraction_numerical': 0.0022727272727272726, 'mean_word_length': 2.6377410468319558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6624867', 'n_tokens_mistral': 804, 'n_tokens_neox': 780, 'n_words': 159}