From 58033043aaeb4c30a442babc0e0a641faae3db1a Mon Sep 17 00:00:00 2001 From: GabrielKS <23368820+GabrielKS@users.noreply.github.com> Date: Fri, 27 Dec 2024 12:52:02 -0600 Subject: [PATCH] Fix lingering `compare_values` bug --- src/base.jl | 2 +- test/test_dynamic_generator.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base.jl b/src/base.jl index c20334eccf..491bc28863 100644 --- a/src/base.jl +++ b/src/base.jl @@ -2425,7 +2425,7 @@ function IS.compare_values( if !compare_uuids name1 = get_name(val1) name2 = get_name(val2) - if !match_fn(name1, name2) + if !_fetch_match_fn(match_fn)(name1, name2) @error "values do not match" T name name1 name2 match = false end diff --git a/test/test_dynamic_generator.jl b/test/test_dynamic_generator.jl index afa39c0e9b..9c731fe503 100644 --- a/test/test_dynamic_generator.jl +++ b/test/test_dynamic_generator.jl @@ -482,6 +482,7 @@ end @test dynamics[1] == Gen1AVR @test get_dynamic_injector(static_gen) == Gen1AVR @test get_base_power(static_gen) == get_base_power(Gen1AVR) + @test PSY.compare_values(static_gen, deepcopy(static_gen)) remove_component!(sys, Gen1AVR) @test isnothing(get_dynamic_injector(static_gen))