Public Vars

Back

bases (clj)

(source)

function

(bases c)
Returns the immediate superclass and direct interfaces of c, if any

Examples

typedclojure/typedclojure
(ns ^:no-doc typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  #?(:cljs (:require-macros [typed.ann-macros.clojure :as macros]))
  (:require [clojure.core :as cc]
            [typed.clojure :as t]
            #?(:clj [typed.ann-macros.clojure :as macros])
            #?(:clj typed.ann.clojure.jvm) ;; jvm annotations
            #?(:clj clojure.core.typed))
  #?(:clj
     (:import (clojure.lang PersistentHashSet PersistentList
                            APersistentMap #_IPersistentCollection
                            #_ITransientSet
                            IRef)
              (java.util Comparator Collection))))

#?@(:cljs [] :default [
cc/bound? [t/AnyVar :* :-> t/Bool]
cc/thread-bound? [t/AnyVar :* :-> t/Bool]
cc/bases [(t/Nilable Class) :-> (t/NilableNonEmptyASeq Class)]
])
replikativ/konserve
(ns konserve.indexeddb-test
  (:require [clojure.core.async :refer [go <! put! take! promise-chan]]
            [cljs.test :refer-macros [deftest is testing async]]
            [konserve.cache :as kc]
            [konserve.core :as k]
            [konserve.indexeddb :as idb]
            [konserve.protocols :as p]
            [konserve.tests.cache :as ct]
            [konserve.tests.encryptor :as et]
            [konserve.tests.gc :as gct]
            [konserve.tests.serializers :as st])
  (:import [goog userAgent]))

(deftest ^:browser lifecycle-test
  (if ^boolean userAgent.GECKO
    (is (true? true))
    (async done
           (go
             (let [db-name "lifecycle-db"]
               (<! (idb/delete-idb db-name))
               (testing "test creation & deletion of databases"
                 (when (is (false? (<! (idb/db-exists? db-name))))
                   (let [res (<! (idb/connect-to-idb db-name))]
                     (when (is (instance? js/IDBDatabase res))
                       (is (true? (<! (idb/db-exists? db-name))))
                       (.close res)
                       (is (nil? (first (<! (idb/delete-idb db-name)))))
                       (is (false? (<! (idb/db-exists? db-name))))))))
               (<! (idb/delete-idb db-name))
               (done))))))
apa512/clj-rethinkdb
(ns rethinkdb.core-test
  (:require [clojure.java.io :as io]
            [byte-streams :as bs]
            [clj-time.core :as t]
            [clj-time.coerce :as c]
            [clojure.test :refer :all]
            [clojure.core.async :as async :refer [go go-loop <! take! <!! close!]]
            [manifold.stream :as s]
            [rethinkdb.query :as r]
            [rethinkdb.test-utils :as utils])
  (:import (clojure.lang ExceptionInfo)
           (java.util UUID Arrays)
           (ch.qos.logback.classic Logger Level)
           (manifold.stream.default Stream)
           (org.slf4j LoggerFactory)))

(deftest manipulating-databases
  (with-open [conn (r/connect)]
    (is (= 1 (:dbs_created (r/run (r/db-create "cljrethinkdb_tmp") conn))))
    (is (= 1 (:dbs_dropped (r/run (r/db-drop "cljrethinkdb_tmp") conn))))
    (is (contains? (set (r/run (r/db-list) conn)) test-db))))