Skip to content

Commit

Permalink
More unittests for pow
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 30, 2023
1 parent 3c692a5 commit 49a5165
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unittests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1493,4 +1493,12 @@ end
x = RealQuantity(2.0)
y = Quantity(2.0im)
@test typeof(x^y) <: Quantity

x = RealQuantity(2.0, length=1)
y = Quantity(2.0im)
@test_throws DimensionError x^y

x = RealQuantity(2.0)
y = Quantity(2.0im, mass=1)
@test_throws DimensionError x^y
end

0 comments on commit 49a5165

Please sign in to comment.