Skip to content

Commit

Permalink
Add explicit finitedifference test, shorten line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Dec 28, 2024
1 parent 67fc779 commit d4a7bde
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/combinations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,20 @@ This file includes tests for:
end # for

iter_diff_methods = (
(true, FiniteDifference()),
(supports.autoenzyme, AutoEnzyme()),
)

for (supported, diff_method) in iter_diff_methods
for (supported, method) in iter_diff_methods
f = testable.integrand
geometry = testable.geometry
sol = testable.solution

if supported
@test integral(
testable.integrand, testable.geometry; diff_method = diff_method)testable.solution rtol=rtol
@test integral(f, geometry; diff_method = method)sol rtol=rtol
@test MeshIntegrals.supports_autoenzyme(testable.geometry) == true
else
@test_throws "not supported" integral(
testable.integrand, testable.geometry; diff_method = diff_method)
@test_throws "not supported" integral(f, geometry; diff_method = method)
@test MeshIntegrals.supports_autoenzyme(testable.geometry) == false
end
end # for
Expand Down

0 comments on commit d4a7bde

Please sign in to comment.