Skip to content

Commit

Permalink
Added tests for invalid exponentiation operations
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Sep 11, 2024
1 parent f30b7d3 commit 7b95db7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,8 @@ end
@test Base.literal_pow(^, l, Val(false)) === one(l)
@test Base.literal_pow(^, k, Val(true)) === k
@test Base.literal_pow(^, l, Val(true)) === l
# These are not defined and should error
@test_throws Base.literal_pow(^, m, Val(1//2))
@test_throws Base.literal_pow(^, m, Val(1/2))
@test_throws Base.literal_pow(^, m, Val(2*im))
end

0 comments on commit 7b95db7

Please sign in to comment.