Skip to content

Commit

Permalink
More call site adjustment in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jszumski committed May 29, 2024
1 parent 0f0ae1c commit a304b61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import SnapshotTesting

final class ViewDistributionSnapshotTests: SnapshotTestCase {

@MainActor
func testDistribution() {
let containerView = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 200))
containerView.backgroundColor = .white
Expand All @@ -45,6 +46,7 @@ final class ViewDistributionSnapshotTests: SnapshotTestCase {
assertSnapshot(matching: containerView, as: .image, named: nameForSnapshot(with: ["vertical"]))
}

@MainActor
func testDistributionIgnoresTransform() {
let containerView = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 200))
containerView.backgroundColor = .white
Expand Down Expand Up @@ -72,6 +74,7 @@ final class ViewDistributionSnapshotTests: SnapshotTestCase {
assertSnapshot(matching: containerView, as: .image, named: nameForSnapshot(with: []))
}

@MainActor
func testDistributionUsingCapInsets() {
let containerView = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 80))
containerView.backgroundColor = .white
Expand Down Expand Up @@ -104,6 +107,7 @@ final class ViewDistributionSnapshotTests: SnapshotTestCase {
assertSnapshot(matching: containerView, as: .image, named: nameForSnapshot(with: []))
}

@MainActor
func testHorizontalDistributionFollowsLayoutDirection() {
let view = HorizontalDistributionView(frame: CGRect(x: 0, y: 0, width: 160, height: 60))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import SnapshotTesting

final class ViewSpeadingSnapshotTests: SnapshotTestCase {

@MainActor
func testHorizontallySpreadSubviews() {
let container = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: 100))
container.backgroundColor = .white
Expand Down Expand Up @@ -92,6 +93,7 @@ final class ViewSpeadingSnapshotTests: SnapshotTestCase {
verifySnapshot(margin: 40, inRect: CGRect(x: 20, y: 10, width: 300, height: 50))
}

@MainActor
func testVerticallySpreadSubviews() {
let container = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: 100))
container.backgroundColor = .white
Expand Down
3 changes: 3 additions & 0 deletions ParalayoutTests/DistributionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ final class DistributionTests: XCTestCase {
let secondSubview = UIView(frame: .init(x: 0, y: 0, width: 50, height: 100))
container.addSubview(secondSubview)

@MainActor
func test(
alignment: VerticalDistributionAlignment?,
inRect layoutRect: CGRect? = nil,
Expand Down Expand Up @@ -98,6 +99,7 @@ final class DistributionTests: XCTestCase {
let secondSubview = UIView(frame: .init(x: 0, y: 0, width: 100, height: 50))
container.addSubview(secondSubview)

@MainActor
func test(
alignment: HorizontalDistributionAlignment?,
inRect layoutRect: CGRect? = nil,
Expand Down Expand Up @@ -161,6 +163,7 @@ final class DistributionTests: XCTestCase {
let secondSubview = UIView(frame: .init(x: 0, y: 0, width: 100, height: 50))
container.addSubview(secondSubview)

@MainActor
func test(
alignment: HorizontalDistributionAlignment?,
inRect layoutRect: CGRect? = nil,
Expand Down

0 comments on commit a304b61

Please sign in to comment.