Skip to content

Commit

Permalink
test 800
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed Mar 13, 2021
1 parent 5a42da6 commit b7cfcf4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/build_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,15 @@ f = eval(build_function(sparse([1],[1], [(x+y)/k], 10,10), [x,y,k])[1])
@test size(f([1.,1.,2])) == (10,10)
@test f([1.,1.,2])[1,1] == 1.0
@test sum(f([1.,1.,2])) == 1.0

let #800
@variables x
y = sparse(1:3,1:3,x)

f1,f2 = build_function(y,x)
sf1, sf2 = string(f1), string(f2)
@test !contains(sf1, "CartesianIndex")
@test !contains(sf2, "CartesianIndex")
@test contains(sf1, "SparseMatrixCSC(")
@test contains(sf2, ".nzval")
end

0 comments on commit b7cfcf4

Please sign in to comment.