Skip to content

Commit 86650a6

Browse files
committed
Add tests for Time.compare/2 with different calendars
1 parent 2a0fb0c commit 86650a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/elixir/test/elixir/calendar/time_test.exs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ defmodule TimeTest do
7777
assert Time.compare(time1, time2) == :eq
7878
assert Time.compare(time1, time3) == :lt
7979
assert Time.compare(time3, time2) == :gt
80+
81+
time1_holocene = ~T[01:01:01.005 Calendar.Holocene]
82+
assert Time.compare(time1_holocene, time1) == :eq
83+
assert Time.compare(time1_holocene, time2) == :eq
84+
assert Time.compare(time1_holocene, time3) == :lt
8085
end
8186

8287
test "before?/2 and after?/2" do

0 commit comments

Comments
 (0)