Closed johnnychen94 closed 4 years ago
Mhm yea I see. I didn't consider testing floating point numbers yet. Since this is basically a text comparision any diff would trigger a failed test
I think the way to do this would be to add a handler. https://github.com/Evizero/ReferenceTests.jl/blob/master/src/handlers.jl
Which would if one side is txt
call parse
on it.
Some extra machiney might have to be added if the format can not be expressed via the file extension.
Possibly the format could be expressed via the .jl
extension, and Meta.parse
could be used?
I tried to use ReferenceTests in the recent development of ImageDistances.jl, but it would directly throw errors even if there's an insignificant numerical difference
which is just caused by Float32 <--> Float64 accuracy issue
I can try to work on it if it’s possible( without much efforts)