File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Sources/TestingExtensions Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -51,18 +51,19 @@ open class SnapshotTestBase: XCTestCase {
5151 let vc = UIHostingController ( rootView: view)
5252 vc. overrideUserInterfaceStyle = uiStyle
5353
54- let suffix : String
55- switch uiStyle {
56- case . unspecified:
57- suffix = " "
58- case . light:
59- suffix = " -light "
60- case . dark:
61- suffix = " -dark "
62- @unknown default :
63- fatalError ( " Unhandled UIUserInterfaceStyle \( uiStyle) " )
64- }
65-
54+ let suffix : String = {
55+ switch uiStyle {
56+ case . unspecified:
57+ return " "
58+ case . light:
59+ return " -light "
60+ case . dark:
61+ return " -dark "
62+ @unknown default :
63+ fatalError ( " Unhandled UIUserInterfaceStyle \( uiStyle) " )
64+ }
65+ } ( )
66+
6667 assertSnapshot (
6768 of: vc,
6869 as: . image( on: config. device, precision: imageDiffPrecision) ,
You can’t perform that action at this time.
0 commit comments