Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhieddine-El-Kaissi committed Oct 16, 2024
1 parent 1aa4dc0 commit 660d852
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions Tests/ThumbprintTests/Snapshot/Shared/SnapshotTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ open class SnapshotTestCase: XCTestCase {
}

@MainActor public func verify<T: UIView>(viewFactory: () -> T,
identifier: String? = nil,
useNavigationController: Bool = false,
sizes: [WindowSize] = [.intrinsic],
padding: CGFloat = Space.two,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: ((T) -> Void)? = nil) {
identifier: String? = nil,
useNavigationController: Bool = false,
sizes: [WindowSize] = [.intrinsic],
padding: CGFloat = Space.two,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: ((T) -> Void)? = nil) {
var newPadding = padding

verifyPrivate(
Expand Down Expand Up @@ -153,17 +153,17 @@ open class SnapshotTestCase: XCTestCase {
}

@MainActor public func verify(view: UIView,
identifier: String? = nil,
useNavigationController: Bool = false,
sizes: [WindowSize] = [.intrinsic],
padding: CGFloat = Space.two,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: (() -> Void)? = nil) {
identifier: String? = nil,
useNavigationController: Bool = false,
sizes: [WindowSize] = [.intrinsic],
padding: CGFloat = Space.two,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: (() -> Void)? = nil) {
var newPadding = padding

if view is UITableView || view is UICollectionView {
Expand Down Expand Up @@ -203,16 +203,16 @@ open class SnapshotTestCase: XCTestCase {
}

@MainActor public func verify<T: UIViewController>(viewControllerFactory: () -> T,
identifier: String? = nil,
useNavigationController: Bool = false,
sizes: [WindowSize] = .allPhones,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: ((T) -> Void)? = nil) {
identifier: String? = nil,
useNavigationController: Bool = false,
sizes: [WindowSize] = .allPhones,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: ((T) -> Void)? = nil) {
if containsIntrinsicSize(in: sizes) {
XCTFail("Intrinsic size is not supported for view controller snapshots.", file: file, line: line)
return
Expand All @@ -233,15 +233,15 @@ open class SnapshotTestCase: XCTestCase {
}

@MainActor public func verify(modalViewControllerFactory: @escaping () -> UIViewController,
identifier: String? = nil,
sizes: [WindowSize] = .allPhones,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: (() -> Void)? = nil) {
identifier: String? = nil,
sizes: [WindowSize] = .allPhones,
safeArea: UIEdgeInsets = .zero,
contentSizeCategories: [UIContentSizeCategory] = .all,
userInterfaceStyles: Set<UIUserInterfaceStyle> = [.light],
verifyLayoutAmbiguity: Bool = true,
file: StaticString = #filePath,
line: UInt = #line,
setUp: (() -> Void)? = nil) {
if containsIntrinsicSize(in: sizes) {
XCTFail("Intrinsic size is not supported for view controller snapshots.", file: file, line: line)
return
Expand Down Expand Up @@ -343,17 +343,17 @@ open class SnapshotTestCase: XCTestCase {
// MARK: - Private

@MainActor private func verifyPrivate<T: UIViewController>(viewControllerFactory: () -> T, // swiftlint:disable:this function_parameter_count
identifier: String?,
useNavigationController: Bool,
sizes: [WindowSize],
padding: CGFloat,
safeArea: UIEdgeInsets,
contentSizeCategories: [UIContentSizeCategory],
userInterfaceStyles: Set<UIUserInterfaceStyle>,
verifyLayoutAmbiguity: Bool,
file: StaticString,
line: UInt,
setUp: ((T) -> Void)?) {
identifier: String?,
useNavigationController: Bool,
sizes: [WindowSize],
padding: CGFloat,
safeArea: UIEdgeInsets,
contentSizeCategories: [UIContentSizeCategory],
userInterfaceStyles: Set<UIUserInterfaceStyle>,
verifyLayoutAmbiguity: Bool,
file: StaticString,
line: UInt,
setUp: ((T) -> Void)?) {
sizes.forEach { size in
contentSizeCategories.forEach { contentSizeCategory in
userInterfaceStyles.forEach { userInterfaceStyle in
Expand Down

0 comments on commit 660d852

Please sign in to comment.