Back
assert-any (clj)
(source)function
(assert-any msg form)
Returns generic assertion code for any test, including macros, Java
method calls, or isolated symbols.
Examples
clojure/core.typed
(ns clojure.core.typed.test.testnew
(:require [clojure.core.typed :as t]
[clojure.test :refer :all]
[clojure.core.typed.test.test-utils :refer :all]
[clojure.core.typed.test.destructure]))
(deftest function?-test
(is-tc-e (function? function?) Boolean
:requires [[clojure.test :refer [function?]]])
(is-tc-err (function? function?) String
:requires [[clojure.test :refer [function?]]]))
(deftest assert-any-test
(is-tc-e (assert-any "Hi" (= 4 (+ 2 2))) Any
:requires [[clojure.test :refer [assert-any]]]))
(deftest do-report-test
(is-tc-e #(do-report 1)
:requires [[clojure.test :refer [do-report]]]))
(deftest run-tests-test
(is-tc-e #(run-tests) [-> (Map Any Any)]
:requires [[clojure.test :refer [run-tests]]])
(is-tc-err #(run-tests) [-> String]
:requires [[clojure.test :refer [run-tests]]]))
(deftest run-all-tests-test
(is-tc-e #(run-all-tests) [-> (Map Any Any)]
:requires [[clojure.test :refer [run-all-tests]]])
(is-tc-e #(run-all-tests #"asdf") [-> (Map Any Any)]
:requires [[clojure.test :refer [run-all-tests]]])
(is-tc-err #(run-all-tests) [:-> String]
:requires [[clojure.test :refer [run-all-tests]]]))
(deftest successful?-test
(is-tc-e #(successful? {}) [-> Boolean]
:requires [[clojure.test :refer [successful?]]]))
(deftest compose-fixtures-test
(is-tc-e (compose-fixtures (fn [a :- [-> Any]] (a))
(fn [b :- [-> Any]] (b)))
[[-> Any] -> Any]
:requires [[clojure.test :refer [compose-fixtures]]]))
(deftest testing-vars-str-test
(is-tc-e #(testing-vars-str {}) [-> String]
:requires [[clojure.test :refer [testing-vars-str]]])
(is-tc-err (testing-vars-str 1) Int
:requires [[clojure.test :refer [testing-vars-str]]]))
(deftest testing-contexts-str-test
(is-tc-e (testing-contexts-str) String
:requires [[clojure.test :refer [testing-contexts-str]]])
(is-tc-err (testing-contexts-str) (Map Any Any)
:requires [[clojure.test :refer [testing-contexts-str]]])
(is-tc-err (testing-contexts-str 1) String
:requires [[clojure.test :refer [testing-contexts-str]]]))
typedclojure/typedclojure
(ns clojure.core.typed.test.testnew
(:require [typed.clojure :as t]
[clojure.test :refer :all]
[typed.clj.checker.test-utils :refer :all]))
(deftest function?-test
(is-tc-e (function? function?) t/Bool
:requires [[clojure.test :refer [function?]]])
(is-tc-err (function? function?) t/Str
:requires [[clojure.test :refer [function?]]]))
(deftest assert-any-test
(is-tc-e (assert-any "Hi" (= 4 (+ 2 2))) t/Any
:requires [[clojure.test :refer [assert-any]]]))
(deftest do-report-test
(is-tc-e #(do-report 1)
:requires [[clojure.test :refer [do-report]]]))
(deftest run-tests-test
(is-tc-e #(run-tests) [-> (t/Map t/Any t/Any)]
:requires [[clojure.test :refer [run-tests]]])
(is-tc-err #(run-tests) [-> t/Str]
:requires [[clojure.test :refer [run-tests]]]))
(deftest run-all-tests-test
(is-tc-e #(run-all-tests) [-> (t/Map t/Any t/Any)]
:requires [[clojure.test :refer [run-all-tests]]])
(is-tc-e #(run-all-tests #"asdf") [-> (t/Map t/Any t/Any)]
:requires [[clojure.test :refer [run-all-tests]]])
(is-tc-err #(run-all-tests) [:-> t/Str]
:requires [[clojure.test :refer [run-all-tests]]]))
(deftest successful?-test
(is-tc-e #(successful? {}) [-> t/Bool]
:requires [[clojure.test :refer [successful?]]]))
(deftest compose-fixtures-test
(is-tc-e (compose-fixtures (fn [a :- [-> t/Any]] (a))
(fn [b :- [-> t/Any]] (b)))
[[-> t/Any] -> t/Any]
:requires [[clojure.test :refer [compose-fixtures]]]))
(deftest testing-vars-str-test
(is-tc-e #(testing-vars-str {}) [-> t/Str]
:requires [[clojure.test :refer [testing-vars-str]]])
(is-tc-err (testing-vars-str 1) t/Int
:requires [[clojure.test :refer [testing-vars-str]]]))
(deftest testing-contexts-str-test
(is-tc-e (testing-contexts-str) t/Str
:requires [[clojure.test :refer [testing-contexts-str]]])
(is-tc-err (testing-contexts-str) (t/Map t/Any t/Any)
:requires [[clojure.test :refer [testing-contexts-str]]])
(is-tc-err (testing-contexts-str 1) t/Str
:requires [[clojure.test :refer [testing-contexts-str]]]))