<commit_before>import XCTest
import SwiftUI
import Combine
@testable import ViewInspector

// MARK: - ViewAccessibilityTests

@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
final class ViewAccessibilityTests: XCTestCase {
    
    func testAccessibilityLabel() throws {
        let sut = EmptyView().accessibility(label: Text(""))
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityLabelInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(label: Text(string))
            .inspect().emptyView().accessibilityLabel().string()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityValue() throws {
        let sut = EmptyView().accessibility(value: Text(""))
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityValueInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(value: Text(string))
            .inspect().emptyView().accessibilityValue().string()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityHint() throws {
        let sut = EmptyView().accessibility(hint: Text(""))
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityHintInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(hint: Text(string))
            .inspect().emptyView().accessibilityHint().string()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityHidden() throws {
        let sut = EmptyView().accessibility(hidden: false)
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityHiddenInspection() throws {
        let sut1 = try EmptyView().accessibility(hidden: true)
            .inspect().emptyView().accessibilityHidden()
        XCTAssertTrue(sut1)
        let sut2 = try EmptyView().accessibility(hidden: false)
            .inspect().emptyView().accessibilityHidden()
        XCTAssertFalse(sut2)
    }
    
    func testAccessibilityIdentifier() throws {
        let sut = EmptyView().accessibility(identifier: "")
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityIdentifierInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(identifier: string)
            .inspect().emptyView().accessibilityIdentifier()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilitySelectionIdentifier() throws {
        let sut = EmptyView().accessibility(selectionIdentifier: "")
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilitySelectionIdentifierInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(selectionIdentifier: string)
            .inspect().emptyView().accessibilitySelectionIdentifier()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityActivationPoint() throws {
        let sut = EmptyView().accessibility(activationPoint: .center)
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityActivationPointInspection() throws {
        let point: UnitPoint = .bottomTrailing
        let sut = try EmptyView().accessibility(activationPoint: point)
            .inspect().emptyView().accessibilityActivationPoint()
        XCTAssertEqual(sut, point)
    }
    
    func testAccessibilityAction() throws {
        let sut = EmptyView().accessibilityAction(.default) { }
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityActionInspection() throws {
        let exp = XCTestExpectation(description: "accessibilityAction")
        let sut = EmptyView().accessibilityAction(.default) {<commit_msg>Silence deprecated warnings for SwiftUI deprecated APIs<commit_after>import XCTest
import SwiftUI
import Combine
@testable import ViewInspector

// MARK: - ViewAccessibilityTests

@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
final class ViewAccessibilityTests: XCTestCase {
    
    func testAccessibilityLabel() throws {
        let sut = EmptyView().accessibility(label: Text(""))
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityLabelInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(label: Text(string))
            .inspect().emptyView().accessibilityLabel().string()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityValue() throws {
        let sut = EmptyView().accessibility(value: Text(""))
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityValueInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(value: Text(string))
            .inspect().emptyView().accessibilityValue().string()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityHint() throws {
        let sut = EmptyView().accessibility(hint: Text(""))
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityHintInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(hint: Text(string))
            .inspect().emptyView().accessibilityHint().string()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityHidden() throws {
        let sut = EmptyView().accessibility(hidden: false)
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityHiddenInspection() throws {
        let sut1 = try EmptyView().accessibility(hidden: true)
            .inspect().emptyView().accessibilityHidden()
        XCTAssertTrue(sut1)
        let sut2 = try EmptyView().accessibility(hidden: false)
            .inspect().emptyView().accessibilityHidden()
        XCTAssertFalse(sut2)
    }
    
    func testAccessibilityIdentifier() throws {
        let sut = EmptyView().accessibility(identifier: "")
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityIdentifierInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(identifier: string)
            .inspect().emptyView().accessibilityIdentifier()
        XCTAssertEqual(sut, string)
    }
    
    @available(iOS, deprecated, introduced: 13.0)
    @available(tvOS, deprecated, introduced: 13.0)
    func testAccessibilitySelectionIdentifier() throws {
        let sut = EmptyView().accessibility(selectionIdentifier: "")
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    @available(iOS, deprecated, introduced: 13.0)
    @available(tvOS, deprecated, introduced: 13.0)
    func testAccessibilitySelectionIdentifierInspection() throws {
        let string = "abc"
        let sut = try EmptyView().accessibility(selectionIdentifier: string)
            .inspect().emptyView().accessibilitySelectionIdentifier()
        XCTAssertEqual(sut, string)
    }
    
    func testAccessibilityActivationPoint() throws {
        let sut = EmptyView().accessibility(activationPoint: .center)
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityActivationPointInspection() throws {
        let point: UnitPoint = .bottomTrailing
        let sut = try EmptyView().accessibility(activationPoint: point)
            .inspect().emptyView().accessibilityActivationPoint()
        XCTAssertEqual(sut, point)
    }
    
    func testAccessibilityAction() throws {
        let sut = EmptyView().accessibilityAction(.default) { }
        XCTAssertNoThrow(try sut.inspect().emptyView())
    }
    
    func testAccessibilityActionInspection() throws {
        let exp = XCTestExpectation(description: "accessibilityAction")
        let sut = EmptyView().accessibilityAction(.default) {
{'fraction_non_alphanumeric': 0.10964801215497594, 'fraction_numerical': 0.0050645733096986575, 'mean_word_length': 3.036280020439448, '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': '4671677', 'n_tokens_mistral': 2265, 'n_tokens_neox': 2132, 'n_words': 426}