Skip to content

Commit

Permalink
Add new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Nov 25, 2024
1 parent 8f9483a commit 7dde572
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/utils.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
@testitem "Utilities" setup=[Setup] begin
using LinearAlgebra: norm
using MeshIntegrals: _units, _zeros, _ones

# _KVector
v = Meshes.Vec(3, 4)
@test norm(MeshIntegrals._KVector(v)) 5.0u"m"

# _units
p = Point(1.0u"cm", 2.0u"mm", 3.0u"m")
@test MeshIntegrals._units(p) == u"m"
@test _units(p) == u"m"

# _zeros
@test _zeros(2) == (0.0, 0.0)
@test _zeros(Float32, 2) == (0.0f0, 0.0f0)

# _ones
@test _ones(2) == (1.0, 1.0)
@test _ones(Float32, 2) == (1.0f0, 1.0f0)
end

@testitem "DifferentiationMethod" setup=[Setup] begin
Expand Down

0 comments on commit 7dde572

Please sign in to comment.