Skip to content

Commit

Permalink
Merge pull request #16 from baggepinnen/JET
Browse files Browse the repository at this point in the history
add JET tests
  • Loading branch information
baggepinnen authored Nov 20, 2024
2 parents 2e03c2a + 3e60247 commit 2e6ace4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SeeToDee"
uuid = "1c904df7-48cd-41e7-921b-d889ed9a470c"
authors = ["Fredrik Bagge Carlson"]
version = "1.3.0"
version = "1.4.0"

[deps]
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
Expand All @@ -20,7 +20,8 @@ StaticArrays = "1"
julia = "1.10"

[extras]
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "JET"]
16 changes: 16 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using StaticArrays
using ForwardDiff
# using NonlinearSolve
using FastGaussQuadrature
using JET

# This has to be defined outside of the testset
function cartesian_pendulum(U, inp, p, t)
Expand Down Expand Up @@ -134,6 +135,21 @@ end
@inferred discrete_dynamics_fe(x, u, 0, 0)
@inferred discrete_dynamics_heun(x, u, 0, 0)


# @test_opt discrete_dynamics(x, u, 0, 0.0)
# @test_opt discrete_dynamics_implicit(x, u, 0, 0.0)
@test_opt discrete_dynamics_rk(x, u, 0, 0.0)
@test_opt discrete_dynamics_rk_ss(x, u, 0, 0.0)
@test_opt discrete_dynamics_rk3(x, u, 0, 0.0)
@test_opt discrete_dynamics_fe(x, u, 0, 0.0)
@test_opt discrete_dynamics_heun(x, u, 0, 0.0)

# @report_call discrete_dynamics_rk(x, u, 0, 0)
# @report_call discrete_dynamics_rk_ss(x, u, 0, 0)
# @report_call discrete_dynamics_rk3(x, u, 0, 0)
# @report_call discrete_dynamics_fe(x, u, 0, 0)
# @report_call discrete_dynamics_heun(x, u, 0, 0)

# Test that the Static version is used despite input x being a normal vector
@test discrete_dynamics_rk(Vector(x), u, 0, 0) isa SVector{4, Float64}
@test discrete_dynamics_rk3(Vector(x), u, 0, 0) isa SVector{4, Float64}
Expand Down

2 comments on commit 2e6ace4

@baggepinnen
Copy link
Owner 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/119795

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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 v1.4.0 -m "<description of version>" 2e6ace4e1cc8f8db64bf4d5292b7e047137551f3
git push origin v1.4.0

Please sign in to comment.