Skip to content

Commit

Permalink
Fix deprecations in snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriyvan committed Jul 27, 2024
1 parent 0949690 commit 348df7b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Tests/geometrizeTests/BitmapTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ final class BitmapTests: XCTestCase {
blending: .yellow
)
assertSnapshot(
matching: bitmapWithYellowBackgroundBlended,
of: bitmapWithYellowBackgroundBlended,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down Expand Up @@ -189,7 +189,7 @@ final class BitmapTests: XCTestCase {
bitmap.transpose()

assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand All @@ -209,7 +209,7 @@ final class BitmapTests: XCTestCase {
bitmap.swap(x1: 10, y1: 10, x2: width / 2, y2: height / 2)

assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand All @@ -236,7 +236,7 @@ final class BitmapTests: XCTestCase {
bitmap.reflectVertically()

assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand All @@ -263,7 +263,7 @@ final class BitmapTests: XCTestCase {
bitmap.reflectHorizontally()

assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down Expand Up @@ -328,12 +328,12 @@ final class BitmapTests: XCTestCase {
let bitmap = try Bitmap(pngBundleResource: "63", withExtension: "png")
let bitmapWithWhiteBackgroundBlended = bitmap.blending(background: .white)
assertSnapshot(
matching: bitmapWithWhiteBackgroundBlended,
of: bitmapWithWhiteBackgroundBlended,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
let bitmapWithRedBackgroundBlended = bitmap.blending(background: .red)
assertSnapshot(
matching: bitmapWithRedBackgroundBlended,
of: bitmapWithRedBackgroundBlended,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down Expand Up @@ -496,7 +496,7 @@ final class BitmapTests: XCTestCase {
}

assertSnapshot(
matching: try Bitmap(ppmString: """
of: try Bitmap(ppmString: """
P3
# "P3" means this is a RGB color image in ASCII
# "3 2" is the width and height of the image in pixels
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/CircleTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class CircleTests: XCTestCase {
)
bitmap.draw(lines: scaleScanlinesTrimmed(width: width, height: height, step: 100), color: .black)
assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/EllipseTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class EllipseTests: XCTestCase {
)
bitmap.draw(lines: scaleScanlinesTrimmed(width: width, height: height, step: 100), color: .black)
assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/LineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class LineTests: XCTestCase {
.black
)
assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/QuadraticBezierTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class QuadraticBezierTests: XCTestCase {
)
bitmap.draw(lines: scaleScanlinesTrimmed(width: width, height: height, step: 100), color: .black)
assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down

0 comments on commit 348df7b

Please sign in to comment.