Skip to content

Commit

Permalink
tests: test length_conversion with non existing units
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 authored and uncomfyhalomacro committed Jan 6, 2024
1 parent 2dc61a8 commit 087dac1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,7 @@ using TheAlgorithms.Conversions
@test length_conversion(5, "in", "m") 0.127
@test length_conversion(3, "ft", "mm") 914.4
@test length_conversion(10, "mi", "km") 16.0934
@test_throws ErrorException length_conversion(1, "m", "wrong_unit")
@test_throws ErrorException length_conversion(1, "wrong_unit", "m")
end
end

0 comments on commit 087dac1

Please sign in to comment.