How should I write a
@testset to verify that a function modifies its argument?
For example, here is a function that is passed a vector (of Rationals)
v and a row index
function divideBelow!(v, row) f = v[row] for i in row:length(v) v[i]=v[i]//f end return v end
Do I just write multiple lines? Like this:
@testset "DivideBelow Tests" begin v = [3//1, 6//5] divideBelow(v, 2) @test v == [3//1, 1//1] end