Skip to content

Commit 384b1c9

Browse files
doozMenstijn
and
stijn
authored
Feature/fixed decimal separator (#889)
* fix formatting of numbers to have stable snapshots as seen in #533 * fix to make tests compile #887 --------- Co-authored-by: stijn <[email protected]>
1 parent 6d932a7 commit 384b1c9

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

Sources/SnapshotTesting/Snapshotting/CGPath.swift

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153

154154
private let defaultNumberFormatter: NumberFormatter = {
155155
let numberFormatter = NumberFormatter()
156+
numberFormatter.decimalSeparator = "."
156157
numberFormatter.minimumFractionDigits = 1
157158
numberFormatter.maximumFractionDigits = 3
158159
return numberFormatter

Sources/SnapshotTesting/Snapshotting/NSBezierPath.swift

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105

106106
private let defaultNumberFormatter: NumberFormatter = {
107107
let numberFormatter = NumberFormatter()
108+
numberFormatter.decimalSeparator = "."
108109
numberFormatter.minimumFractionDigits = 1
109110
numberFormatter.maximumFractionDigits = 3
110111
return numberFormatter

Tests/SnapshotTestingTests/AssertSnapshotSwiftTests.swift

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#if canImport(Testing)
22
import Testing
33
import Foundation
4-
import InlineSnapshotTesting
54
@_spi(Experimental) import SnapshotTesting
65

76
@Suite(

0 commit comments

Comments
 (0)