|
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
|
@@ -304,7 +304,7 @@ toterm(t) = Term{symtype(t)}(operation(t), arguments(t))
|
304 | 304 | @syms a b c
|
305 | 305 | @test isequal(toterm(-1c), Term{Number}(*, [-1, c]))
|
306 | 306 | @test isequal(toterm(-1(a+b)), Term{Number}(+, [-1a, -b]))
|
307 |
| - @test isequal(toterm((a + b) - (b + c)), Term{Number}(+, [a, -1c])) |
| 307 | + @test isequal(toterm((a + b) - (b + c)), Term{Number}(+, [-1c, a])) |
308 | 308 | end
|
309 | 309 |
|
310 | 310 | @testset "hash" begin
|
|
346 | 346 | a1 = setmetadata(a, Ctx1, "meta_1")
|
347 | 347 | a2 = setmetadata(a, Ctx1, "meta_1")
|
348 | 348 | a3 = setmetadata(a, Ctx2, "meta_2")
|
349 |
| - @test !isequal_with_metadata(a, a1) |
350 |
| - @test isequal_with_metadata(a1, a2) |
351 |
| - @test !isequal_with_metadata(a1, a3) |
| 349 | + @test !isequal_core(a, a1; full=true) |
| 350 | + @test isequal_core(a1, a2; full=true) |
| 351 | + @test !isequal_core(a1, a3; full=true) |
352 | 352 | end
|
353 | 353 |
|
354 | 354 | @testset "subtyping" begin
|
|
437 | 437 | x = setmetadata(x(t), Int, 3)
|
438 | 438 | ex = x * y
|
439 | 439 | res = substitute(ex, Dict(y => 1))
|
440 |
| - @test SymbolicUtils.isequal_with_metadata(res, x) |
| 440 | + @test SymbolicUtils.isequal_core(res, x; full=true) |
441 | 441 | ex = x + y
|
442 | 442 | res = substitute(ex, Dict(y => 0))
|
443 |
| - @test SymbolicUtils.isequal_with_metadata(res, x) |
| 443 | + @test SymbolicUtils.isequal_core(res, x; full=true) |
444 | 444 | end
|
0 commit comments