Skip to content

Commit 76bf09d

Browse files
committed
Handle BasicSymbolic expressions in test
The testing expression generator generates expressions of type `Symbolics.BasicSymbolic{Number}` when all the selected variables are of that type (generated by `@syms` instead of `@variables`). Add a method to wrap these expressions with a `Num` before checking for cancelation.
1 parent fb0265e commit 76bf09d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/semipoly.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ end
426426

427427
const components = [2, a, b, c, x, y, z, (1+x), (1+y)^2, z*y, z*x]
428428

429+
function verify(t::Symbolics.BasicSymbolic{Number}, d, wrt, nl)
430+
verify(Num(t), d, wrt, nl)
431+
end
432+
429433
function verify(t, d, wrt, nl)
430434
try
431435
iszero(t - (isempty(d) ? nl : sum(k*v for (k, v) in d) + nl))

0 commit comments

Comments
 (0)