jump-dev / Convex.jl

A Julia package for disciplined convex programming
https://jump.dev/Convex.jl/stable/
Other
559 stars 119 forks source link

Test Atoms on constants #616

Closed ericphanson closed 2 months ago

ericphanson commented 2 months ago

We should test

z = Variable()
p = satisfy(z == atom(x))
solve!(p)
@test evaluate(z) == evaluate(atom(x))

for each atom, with appropriate sizes and number of args etc (and isapprox instead of ==).

This would check that the conic form has a valid path for constant expressions and agrees with evaluate. (Possibly we can cut out the solver somehow from this test?).

Came up in #613 where I had an incomplete implementation that passed existing tests, which didn’t handle the constant case correctly.

odow commented 2 months ago

Closed by #617 and #626