Skip to content

Fix test_approx buglets #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 27, 2022
Merged

Fix test_approx buglets #259

merged 3 commits into from
Jul 27, 2022

Conversation

mzgubic
Copy link
Member

@mzgubic mzgubic commented Jul 27, 2022

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙂

test_approx(x::ZeroTangent, y::ZeroTangent, msg=""; kwargs...) = @test true
test_approx(x::NoTangent, y::NoTangent, msg=""; kwargs...) = @test true

function test_approx(z::AbstractZero, x::AbstractArray{<:AbstractArray}, msg=""; kwargs...)
for el in x
test_approx(el, z, msg; kwargs...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter but arguably a bit more consistent would be

Suggested change
test_approx(el, z, msg; kwargs...)
test_approx(z, el, msg; kwargs...)

@mzgubic mzgubic merged commit 6925da1 into main Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants