File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
-
2
- public enum DecodingError : Error , Equatable {
3
- case invalidLength
4
- case invalidCharacter( UInt8 )
5
- case unexpectedPaddingCharacter
6
- case unexpectedEnd
1
+ public extension Base64 {
2
+ enum DecodingError : Error , Equatable {
3
+ case invalidLength
4
+ case invalidCharacter( UInt8 )
5
+ case unexpectedPaddingCharacter
6
+ case unexpectedEnd
7
+ }
7
8
}
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class ChromiumTests: XCTestCase {
82
82
83
83
func testBase64DecodingWithPoop( ) {
84
84
XCTAssertThrowsError ( _ = try Base64 . decode ( bytes: " 💩 " . utf8) ) { error in
85
- XCTAssertEqual ( error as? DecodingError , . invalidCharacter( 240 ) )
85
+ XCTAssertEqual ( error as? Base64 . DecodingError , . invalidCharacter( 240 ) )
86
86
}
87
87
}
88
88
@@ -112,7 +112,7 @@ class ChromiumTests: XCTestCase {
112
112
113
113
func testBase64DecodingWithInvalidLength( ) {
114
114
XCTAssertThrowsError ( _ = try Base64 . decode ( bytes: " AAAAA " . utf8) ) { error in
115
- XCTAssertEqual ( error as? DecodingError , . invalidLength)
115
+ XCTAssertEqual ( error as? Base64 . DecodingError , . invalidLength)
116
116
}
117
117
}
118
118
You can’t perform that action at this time.
0 commit comments