Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5e4a46d

Browse files
transitivity tests
1 parent 24388e8 commit 5e4a46d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

‎test/java_time/api_test.clj

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,8 @@
903903
(testing "transitivity"
904904
(let [interval-1-2 (j/interval 1 2)
905905
interval-3-4 (j/interval 3 4)
906+
interval-1-4 (j/interval 1 4)
907+
interval-2-3 (j/interval 2 3)
906908
interval-1-3 (j/interval 1 3)
907909
instant-1 (j/instant 1)
908910
instant-2 (j/instant 2)
@@ -924,10 +926,20 @@
924926
(is (not (j/before? interval-1-3 instant-1)))
925927
(is (not (= interval-1-3 instant-1)))
926928
(is (not (j/<= interval-1-3 instant-1)))
929+
(is (not (j/<= interval-1-3 instant-1)))
927930
(is (not (j/<= instant-1 interval-1-3)))
928931
(is (not (j/>= interval-1-3 instant-1)))
929932
(is (not (j/>= instant-1 interval-1-3)))
930-
(is (not (j/<= instant-1 interval-1-3 instant-3)))))
933+
(is (not (j/<= instant-1 interval-1-3 instant-3)))
934+
(is (not (= interval-1-4 interval-2-3)))
935+
(is (not (j/< interval-1-4 interval-2-3)))
936+
(is (not (j/< interval-2-3 interval-1-4)))
937+
(is (not (j/> interval-1-4 interval-2-3)))
938+
(is (not (j/> interval-2-3 interval-1-4)))
939+
(is (not (j/<= interval-1-4 interval-2-3)))
940+
(is (not (j/<= interval-2-3 interval-1-4)))
941+
(is (not (j/>= interval-1-4 interval-2-3)))
942+
(is (not (j/>= interval-2-3 interval-1-4)))))
931943
(is-asymmetric (j/before? (j/interval 1000 2000) (j/instant 5000)))
932944
(testing "exclusive end"
933945
(is-asymmetric (j/before? (j/interval 1000 5000) (j/instant 5000)))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /