1212//
1313//===----------------------------------------------------------------------===//
1414
15-
16- // #############################################################################
17- // # #
18- // # DO NOT EDIT THIS FILE; IT IS AUTOGENERATED. #
19- // # #
20- // #############################################################################
21-
15+ // #############################################################################
16+ // # #
17+ // # DO NOT EDIT THIS FILE; IT IS AUTOGENERATED. #
18+ // # #
19+ // #############################################################################
2220
2321import Testing
2422@testable import Configuration
2523import ConfigurationTestingInternal
2624
2725struct ConfigSnapshotReaderMethodTestsGet2 {
28-
26+
2927 typealias Defaults = ConfigReaderTests . Defaults
3028 typealias TestEnum = ConfigReaderTests . TestEnum
3129 typealias TestStringConvertible = ConfigReaderTests . TestStringConvertible
@@ -34,11 +32,14 @@ struct ConfigSnapshotReaderMethodTestsGet2 {
3432 @Test func get( ) async throws {
3533 let config = ConfigReaderTests . config
3634
37- do {
35+ do {
3836 let snapshot = config. snapshot ( )
3937
4038 // Optional - success
41- #expect( snapshot. string ( forKey: " stringConvertible " , as: TestStringConvertible . self) == Defaults . stringConvertible)
39+ #expect(
40+ snapshot. string ( forKey: " stringConvertible " , as: TestStringConvertible . self)
41+ == Defaults . stringConvertible
42+ )
4243
4344 // Optional - missing
4445 #expect( snapshot. string ( forKey: " absentStringConvertible " , as: TestStringConvertible . self) == nil )
@@ -47,25 +48,50 @@ struct ConfigSnapshotReaderMethodTestsGet2 {
4748 #expect( snapshot. string ( forKey: " failure " , as: TestStringConvertible . self) == nil )
4849
4950 // Defaulted - success
50- #expect( snapshot. string ( forKey: " stringConvertible " , as: TestStringConvertible . self, default: Defaults . otherStringConvertible) == Defaults . stringConvertible)
51+ #expect(
52+ snapshot. string (
53+ forKey: " stringConvertible " ,
54+ as: TestStringConvertible . self,
55+ default: Defaults . otherStringConvertible
56+ ) == Defaults . stringConvertible
57+ )
5158
5259 // Defaulted - missing
53- #expect( snapshot. string ( forKey: " absentStringConvertible " , as: TestStringConvertible . self, default: Defaults . otherStringConvertible) == Defaults . otherStringConvertible)
60+ #expect(
61+ snapshot. string (
62+ forKey: " absentStringConvertible " ,
63+ as: TestStringConvertible . self,
64+ default: Defaults . otherStringConvertible
65+ ) == Defaults . otherStringConvertible
66+ )
5467
5568 // Defaulted - failing
56- #expect( snapshot. string ( forKey: " failure " , as: TestStringConvertible . self, default: Defaults . otherStringConvertible) == Defaults . otherStringConvertible)
69+ #expect(
70+ snapshot. string (
71+ forKey: " failure " ,
72+ as: TestStringConvertible . self,
73+ default: Defaults . otherStringConvertible
74+ ) == Defaults . otherStringConvertible
75+ )
5776
5877 // Required - success
59- try #expect( snapshot. requiredString ( forKey: " stringConvertible " , as: TestStringConvertible . self) == Defaults . stringConvertible)
78+ try #expect(
79+ snapshot. requiredString ( forKey: " stringConvertible " , as: TestStringConvertible . self)
80+ == Defaults . stringConvertible
81+ )
6082
6183 // Required - missing
62- let error1 = #expect( throws: ConfigError . self) { try snapshot. requiredString ( forKey: " absentStringConvertible " , as: TestStringConvertible . self) }
84+ let error1 = #expect( throws: ConfigError . self) {
85+ try snapshot. requiredString ( forKey: " absentStringConvertible " , as: TestStringConvertible . self)
86+ }
6387 #expect( error1 == . missingRequiredConfigValue( AbsoluteConfigKey ( [ " absentStringConvertible " ] ) ) )
6488
6589 // Required - failing
66- #expect( throws: TestProvider . TestError. self) { try snapshot. requiredString ( forKey: " failure " , as: TestStringConvertible . self) }
90+ #expect( throws: TestProvider . TestError. self) {
91+ try snapshot. requiredString ( forKey: " failure " , as: TestStringConvertible . self)
92+ }
6793 }
68- do {
94+ do {
6995 let snapshot = config. snapshot ( )
7096
7197 // Optional - success
@@ -78,23 +104,36 @@ struct ConfigSnapshotReaderMethodTestsGet2 {
78104 #expect( snapshot. string ( forKey: " failure " , as: TestEnum . self) == nil )
79105
80106 // Defaulted - success
81- #expect( snapshot. string ( forKey: " stringEnum " , as: TestEnum . self, default: Defaults . otherStringEnum) == Defaults . stringEnum)
107+ #expect(
108+ snapshot. string ( forKey: " stringEnum " , as: TestEnum . self, default: Defaults . otherStringEnum)
109+ == Defaults . stringEnum
110+ )
82111
83112 // Defaulted - missing
84- #expect( snapshot. string ( forKey: " absentStringEnum " , as: TestEnum . self, default: Defaults . otherStringEnum) == Defaults . otherStringEnum)
113+ #expect(
114+ snapshot. string ( forKey: " absentStringEnum " , as: TestEnum . self, default: Defaults . otherStringEnum)
115+ == Defaults . otherStringEnum
116+ )
85117
86118 // Defaulted - failing
87- #expect( snapshot. string ( forKey: " failure " , as: TestEnum . self, default: Defaults . otherStringEnum) == Defaults . otherStringEnum)
119+ #expect(
120+ snapshot. string ( forKey: " failure " , as: TestEnum . self, default: Defaults . otherStringEnum)
121+ == Defaults . otherStringEnum
122+ )
88123
89124 // Required - success
90125 try #expect( snapshot. requiredString ( forKey: " stringEnum " , as: TestEnum . self) == Defaults . stringEnum)
91126
92127 // Required - missing
93- let error1 = #expect( throws: ConfigError . self) { try snapshot. requiredString ( forKey: " absentStringEnum " , as: TestEnum . self) }
128+ let error1 = #expect( throws: ConfigError . self) {
129+ try snapshot. requiredString ( forKey: " absentStringEnum " , as: TestEnum . self)
130+ }
94131 #expect( error1 == . missingRequiredConfigValue( AbsoluteConfigKey ( [ " absentStringEnum " ] ) ) )
95132
96133 // Required - failing
97- #expect( throws: TestProvider . TestError. self) { try snapshot. requiredString ( forKey: " failure " , as: TestEnum . self) }
134+ #expect( throws: TestProvider . TestError. self) {
135+ try snapshot. requiredString ( forKey: " failure " , as: TestEnum . self)
136+ }
98137 }
99138 }
100139}
0 commit comments