I’m struggling to figure out how to use @test_reference
from ReferenceTests.jl for a Matrix{Float64} type. If I do
@test_reference "data.dat" data
then the data is stored as a string and compared as a string. This means I can’t use the by
keyword to do a tolerance check. If I try to store as "data.csv"
then I get an error Can't write this data to a CSV file
.
If I want my data stored/loaded as a Matrix{Float64}
, then which file format should I use? Or more generally, what is the recommended method to @test
for matrix data? I like that @test_reference
provides automatic file generation and loading, but is it better done another way?