Skip to content

Commit

Permalink
Fix deprecation warnings in snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriyvan committed Jul 26, 2024
1 parent a60510d commit d851316
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/BitmapDownsampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class BitmapDownsampleTests: XCTestCase {

let bitmapDownsampledBy2 = bitmap.downsample(factor: 2)
assertSnapshot(
matching: bitmapDownsampledBy2,
of: bitmapDownsampledBy2,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/BitmapExporterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class BitmapExporterTests: XCTestCase {
let exporter = BitmapExporter()
let bitmap = exporter.export(data: results, width: 100, height: 100)
assertSnapshot(
matching: bitmap,
of: bitmap,
as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image)
)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/ImageRunnerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ final class ImageRunnerTests: XCTestCase {
shapeData.append(shapeResult)
print(", \(shapeResult.shape.description) added.", terminator: "")
case .match:
print(", geometrizing matched source image.", terminator: "")
//print(", geometrizing matched source image.", terminator: "")
break loop
case .failure:
print(", failure, no shapes added.", terminator: "")
Expand Down
2 changes: 1 addition & 1 deletion Tests/geometrizeTests/TriangleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class TriangleTests: 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
4 changes: 2 additions & 2 deletions Tests/geometrizeTests/bresenhamTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class BresenhamTests: XCTestCase {
points.append(contentsOf: drawThickLine(from: Point(x: 50, y: 350), to: Point(x: 50, y: 50)))
points.forEach { bitmap[$0] = .black }
bitmap.draw(lines: scaleScanlinesTrimmed(width: 500, height: 400, step: 100), color: .black)
assertSnapshot(matching: bitmap, as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image))
assertSnapshot(of: bitmap, as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image))
}

func testBresenhamThickness() throws {
Expand All @@ -35,7 +35,7 @@ final class BresenhamTests: XCTestCase {
bitmap[$0] = .black
}
bitmap.draw(lines: scaleScanlinesTrimmed(width: 500, height: 400, step: 100), color: .black)
assertSnapshot(matching: bitmap, as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image))
assertSnapshot(of: bitmap, as: SimplySnapshotting(pathExtension: "png", diffing: Diffing<Bitmap>.image))
}

}

0 comments on commit d851316

Please sign in to comment.