use expression compare instead of print as string
Roger-luo opened this issue · 1 comments
Roger-luo commented
use the isapprox implemented here: https://github.com/QuantumBFS/OpenQASM.jl/blob/master/test/runtests.jl#L325
the printing doesn't guarantee equivalence
YaoBlocksQASM.jl/test/runtests.jl
Line 53 in 6854da5
Sov-trotter commented
Sure. There seems to be one minor issue with using that.
eg:
So isapprox
fails here. We might need to increase the tolerance values. Other way is figure out a way to ensure proper generation of RBNF.Token
. But I don't think we can account for parameters like colno
, lineno
.
Eg: Currently I just create it using constructors which leaves out other parameters(the zeros)