Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst committed Jan 26, 2022
1 parent 5ee9335 commit cd05470
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/evaluate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ as a named tuple.
function evaluate(func::Functional; derivatives=0:1, rho::AbstractArray, kwargs...)
@assert all(0 .≤ derivatives .≤ 4)
if !all(d in supported_derivatives(func) for d in derivatives)
error("Functional $(func.identifier) does only support derivatives of " *
"orders $(supported_derivatives(func)), but you requested $derivatives.")
throw(ArgumentError("Functional $(func.identifier) does only support derivatives " *
"of orders $(supported_derivatives(func)), but you " *
"requested $derivatives."))
end

# Determine the gridshape (i.e. the shape of the grid points without the spin components)
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ end

# Derivatives ≥ 3 not compiled into libxc at the moment
@test_throws ArgumentError evaluate(func, rho=rho, derivatives=0:3)
@test_throws ArgumentError evaluate!(func, rho=rho, v3rho3=randn(5))

@test_throws DimensionMismatch evaluate!(func, rho=rho, zk=randn(2))
end
Expand Down

2 comments on commit cd05470

@mfherbst
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/53205

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.9 -m "<description of version>" cd0547082474730018ffa189e32f262f231644a6
git push origin v0.3.9

Please sign in to comment.