-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base32 #29
Base32 #29
Conversation
Codecov Report
@@ Coverage Diff @@
## main #29 +/- ##
==========================================
+ Coverage 91.32% 91.66% +0.33%
==========================================
Files 2 2
Lines 173 276 +103
==========================================
+ Hits 158 253 +95
- Misses 15 23 +8
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time, @adam-fowler! This looks great 👍
var string = "AAAAAAAAAAAAAAAAA" | ||
string.makeContiguousUTF8() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var string = "AAAAAAAAAAAAAAAAA" | |
string.makeContiguousUTF8() | |
let string = "AAAAAAAAAAAAAAAAA" |
Is there a reason to call makeContiguousUTF8
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't necessary. I copied Fabian tests for Base64 and he has it there.
|
||
func testBase32DecodingWithPoop() { | ||
XCTAssertThrowsError(_ = try Base32.decode(bytes: "💩".utf8)) { error in | ||
XCTAssertEqual(error as? Base32.DecodingError, .invalidCharacter(240)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💩👍
@slashmo I noticed Fabian had prepared a branch which moves code about to make it more inline with having two baseN implementations. ie The base64 code is inside the Base64.swift file and not Chromium.swift. Do you want me to merge that in as well? Would look cleaner |
@adam-fowler I would certainly like to see that part merged in, for sure. |
@gwynne Base64 code has been moved into Base64.swift to make it consistent |
Given the last Base32 PR seems to have died. Here is mine