[#250] Make -cache work with relative path.#252
[#250] Make -cache work with relative path.#252williambrode wants to merge 1 commit intofyne-io:developfrom
Conversation
|
Perhaps a maintainer could suggest where to add a test for this? I could add it around the immediate function (Mount) but then I'd just be testing the specific implementation. |
|
We currently have mostly unit test in the form of things that test how a function will provide a result depending on its input. That would be something you could easily add as a new file in But these are not super useful as it only prove that things match your expectation, not that it work. We do have some better/more useful end 2 end kind of tests with the CI that build full application using fyne-cross, but they are too broad and we don't get any code coverage out of them. I would love to see some more integration tests that actually show fyne-cross work and provide proper tests coverage. I think that is really further away at the moment. |
andydotxyz
left a comment
There was a problem hiding this comment.
Looks good, though it may imply the same should be done to the work dir in case it too is relative?
Regarding testing it may be that moving to helper methods which are easily tested is the way - a method named "Mount" would not necessarily be expected to do so much logic as it sounds pretty clear that it's mounting the paths. If the "cacheDirAbsOrDefault" helper existed then mount would essentially set up the object and create the dirs, a cleaner function overall I'd think.
Description:
Fixes #(issue)
Checklist:
Where applicable:
go mod vendor).