<commit_before>import XCTest
@testable import TableControlling

class DynamicTableTests: XCTestCase {
    
    // MARK: equals tests
    
    var lhs: DynamicTable<None, None, None, None, None>!
    var rhs: DynamicTable<None, None, None, None, None>!
    
    func test_equals_bothReady_true() {
        (lhs, rhs) = (.ready, .ready)
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothLoading_true() {
        (lhs, rhs) = (.loading, .loading)
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothDisplaying_sameTable_true() {
        (lhs, rhs) = (.displaying(.create()), .displaying(.create()))
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothDisplaying_differentTables_false() {
        (lhs, rhs) = (.displaying(.create()), .displaying(.create(sections: [.create()])))
        XCTAssertNotEqual(lhs, rhs)
        XCTAssertNotEqual(rhs, lhs)
    }
    
    func test_equals_oneReadyOneLoading_false() {
        (lhs, rhs) = (.ready, .loading)
        XCTAssertNotEqual(lhs, rhs)
        XCTAssertNotEqual(rhs, lhs)
    }
    
    func test_equals_bothFailed_sameError_true() {
        enum Failure: Error { case bees }
        (lhs, rhs) = (.failed(Failure.bees), .failed(Failure.bees))
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothFailed_differentErrors_false() {
        enum Failure: Error { case ants, bears }
        (lhs, rhs) = (.failed(Failure.ants), .failed(Failure.bears))
        XCTAssertNotEqual(lhs, rhs)<commit_msg>Refactor DynamicTable tests<commit_after>import XCTest
@testable import TableControlling

class DynamicTableTests: XCTestCase {
    
    // MARK: equals tests
    
    var lhs: DynamicTable<None, None, None, None, None>!
    var rhs: DynamicTable<None, None, None, None, None>!
    
    func test_equals_bothReady_true() {
        (lhs, rhs) = (.ready, .ready)
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothLoading_true() {
        (lhs, rhs) = (.loading, .loading)
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothDisplaying_sameTable_true() {
        (lhs, rhs) = (.displaying(.create()), .displaying(.create()))
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    func test_equals_bothDisplaying_differentTables_false() {
        (lhs, rhs) = (.displaying(.create()), .displaying(.create(sections: [.create()])))
        XCTAssertNotEqual(lhs, rhs)
        XCTAssertNotEqual(rhs, lhs)
    }
    
    func test_equals_oneReadyOneLoading_false() {
        (lhs, rhs) = (.ready, .loading)
        XCTAssertNotEqual(lhs, rhs)
        XCTAssertNotEqual(rhs, lhs)
    }
    
    func test_equals_bothFailed_sameError_true() {
        (lhs, rhs) = (.failed(Failure.bees), .failed(Failure.bees))
        XCTAssertEqual(lhs, rhs)
        XCTAssertEqual(rhs, lhs)
    }
    
    enum Failure: Error { case ants, bees }

    func test_equals_bothFailed_differentErrors_false() {
        (lhs, rhs) = (.failed(Failure.ants), .failed(Failure.bees))
        XCTAssertNotEqual(lhs, rhs)
{'fraction_non_alphanumeric': 0.12127724900214921, 'fraction_numerical': 0.0, 'mean_word_length': 2.7577854671280275, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4623728', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1101, 'n_words': 206}