Add unit-tests to resolve#173
Conversation
TimJentzsch
left a comment
There was a problem hiding this comment.
The cases are not that fun to review because the lines are so long that they wrap and GitHub and they don't have syntax highlighting, but we probably can't fix that.
Anyway, seems solid for me. The resolve_size one has a lot of cases, I wonder if the property based testing frameworks that @alice-i-cecile recommended would help with that? I haven't looked into them yet.
In any case, it's good to see more unit tests, that will definitely help with refactoring and optimizations!
alice-i-cecile
left a comment
There was a problem hiding this comment.
Not the prettiest, but I think this is good for now.
Merging to make refactors easier.
|
I was thinking of doing some tests just like this ones for the remaining public functions in this file. |
Yes please!
This seems like a nice format; we can use it for consistency but feel free to raise concerns that you have.
For unit tests of internal functionality like this, keep them in the same file as they're defined. Integration tests belong in the root level |
Objective
A tiny step towards #92, but mostly I need to see where things are breaking when working on #160 and building unit-test helps.
Feedback wanted
Not quite sure if these are considered good tests as they feel a tiny bit arbitrary in terms of which magical numbers to test for, so any feedback is welcome :)