Back
contains? (clj)
(source)function
(contains? x y)
Examples
tick
(ns tick.alpha.interval-test
(:require
[clojure.spec.alpha :as s]
[tick.core :as t]
[tick.protocols :as p]
[clojure.test
:refer [deftest is testing run-tests]
:refer-macros [deftest is testing run-tests]]
[tick.alpha.interval :as ti]
#?@(:cljs [[java.time :refer [Instant LocalDateTime LocalTime]]]))
#?(:clj
(:import [java.time LocalDateTime Instant LocalTime])))
(deftest concur?-test []
(is (nil?
(ti/concur?
(ti/new-interval (instants 0) (instants 1))
(ti/new-interval (instants 2) (instants 3)))))
(is (= (ti/concur?
(ti/new-interval (instants 0) (instants 2))
(ti/new-interval (instants 1) (instants 3)))
ti/overlaps?))
(is (= (ti/concur?
(ti/new-interval (instants 0) (instants 3))
(ti/new-interval (instants 1) (instants 2)))
ti/contains?)))