view test/test_utils.jl @ 723:c16abc564b82 feature/laplace_opset

Change from EquidistantGrid to AbstractGrid in Laplace interface
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 17 Mar 2021 10:20:05 +0100
parents 988e9cfcd58d
children
line wrap: on
line source

"""
    cmp_fields(s1,s2)

Compares the fields of two structs s1, s2, using the == operator.
"""
function cmp_fields(s1::T,s2::T) where T
    f = fieldnames(T)
    return getfield.(Ref(s1),f) == getfield.(Ref(s2),f)
end