|
1 |
| -using SymbolicUtils: Symbolic, Sym, FnType, Term, Add, Mul, Pow, symtype, operation, arguments, issym, isterm, BasicSymbolic, term, isequal_with_metadata |
| 1 | +using SymbolicUtils: Symbolic, Sym, FnType, Term, Add, Mul, Pow, symtype, operation, arguments, issym, isterm, BasicSymbolic, term, isequal_core |
2 | 2 | using SymbolicUtils
|
3 | 3 | using ConstructionBase: setproperties
|
4 | 4 | using Setfield
|
@@ -298,7 +298,7 @@ toterm(t) = Term{symtype(t)}(operation(t), arguments(t))
|
298 | 298 | @syms a b c
|
299 | 299 | @test isequal(toterm(-1c), Term{Number}(*, [-1, c]))
|
300 | 300 | @test isequal(toterm(-1(a+b)), Term{Number}(+, [-1a, -b]))
|
301 |
| - @test isequal(toterm((a + b) - (b + c)), Term{Number}(+, [a, -1c])) |
| 301 | + @test isequal(toterm((a + b) - (b + c)), Term{Number}(+, [-1c, a])) |
302 | 302 | end
|
303 | 303 |
|
304 | 304 | @testset "hash" begin
|
|
340 | 340 | a1 = setmetadata(a, Ctx1, "meta_1")
|
341 | 341 | a2 = setmetadata(a, Ctx1, "meta_1")
|
342 | 342 | a3 = setmetadata(a, Ctx2, "meta_2")
|
343 |
| - @test !isequal_with_metadata(a, a1) |
344 |
| - @test isequal_with_metadata(a1, a2) |
345 |
| - @test !isequal_with_metadata(a1, a3) |
| 343 | + @test !isequal_core(a, a1; full=true) |
| 344 | + @test isequal_core(a1, a2; full=true) |
| 345 | + @test !isequal_core(a1, a3; full=true) |
346 | 346 | end
|
347 | 347 |
|
348 | 348 | @testset "subtyping" begin
|
|
424 | 424 | x = setmetadata(x(t), Int, 3)
|
425 | 425 | ex = x * y
|
426 | 426 | res = substitute(ex, Dict(y => 1))
|
427 |
| - @test SymbolicUtils.isequal_with_metadata(res, x) |
| 427 | + @test SymbolicUtils.isequal_core(res, x; full=true) |
428 | 428 | ex = x + y
|
429 | 429 | res = substitute(ex, Dict(y => 0))
|
430 |
| - @test SymbolicUtils.isequal_with_metadata(res, x) |
| 430 | + @test SymbolicUtils.isequal_core(res, x; full=true) |
431 | 431 | end
|
0 commit comments