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
Add dedicated benchmarking test suite #34
Conversation
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
==========================================
+ Coverage 73.4% 74.51% +1.11%
==========================================
Files 30 30
Lines 1440 1440
==========================================
+ Hits 1057 1073 +16
+ Misses 383 367 -16
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 @regexident, but there are a few small changes needed: removing print
and trailing whitespaces
hm, now a benchmark test fails on CI... |
Yeah, I noticed that, too. 🤨 |
These benchmarks currently cause XMLCoder to hard crash with a fatal error. |
There were way too many functions returning `throw -> _?` in `XMLDecoder`, which should only ever return `throw -> _` (turning the `nil` case into an error of its own). 👷🏻♀️ I also managed to get rid of quite a bunch of force-unwraps. Especially the ones eventually leading to crashes in #38 and #34. 💥 * Make error handling in `XMLDecoder` simpler & safer * SwiftFormat and related cleanup
#34 encounters a crasher when trying to decode nested arrays. This PR tries to add some more tests for nested keyed/unkeyed collections: - `[String: [Int]]` (dictionary of arrays) - `[String: [String: Int]]` (dictionary of dictionaries) - `[[Int]]` (array of arrays) - `[[String: Int]]` (array of dictionaries) * Added tests for nested complex (keyed/unkeyed) boxes * Fix trailing whitespace and indentation * Remove whitespace between doc comment and code * Avoid conflict in XMLDecoder.swift
CoreOffice#34 encounters a crasher when trying to decode nested arrays. This PR tries to add some more tests for nested keyed/unkeyed collections: - `[String: [Int]]` (dictionary of arrays) - `[String: [String: Int]]` (dictionary of dictionaries) - `[[Int]]` (array of arrays) - `[[String: Int]]` (array of dictionaries) * Added tests for nested complex (keyed/unkeyed) boxes * Fix trailing whitespace and indentation * Remove whitespace between doc comment and code * Avoid conflict in XMLDecoder.swift
Admittedly the
_ closure: (() -> ()) -> ()
+closure { … }
mumbo jumbo isn't the prettiest code I've ever written, but then again XCTest isn't a particularly usable testing framework either. 🤷🏻♂️Xcode attaches the measurements popover to literal code occurrences of
self.measure { … }
itself, making the whole mess required in the first place. 🙄(All while only supporting a single
self.measure { … }
per unit test. 🤦🏻♂️)