diff options
Diffstat (limited to 'test-is-api.html')
-rw-r--r-- | test-is-api.html | 78 |
1 files changed, 48 insertions, 30 deletions
diff --git a/test-is-api.html b/test-is-api.html index f5349c08..754cb7e5 100644 --- a/test-is-api.html +++ b/test-is-api.html @@ -76,6 +76,8 @@ namespace. </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#clojure.contrib.test-is/deftest-">deftest-</a> </div><div style="margin-left: 1em;" class="toc-entry"> + <a href="#clojure.contrib.test-is/do-report">do-report</a> + </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#clojure.contrib.test-is/do-template">do-template</a> </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#clojure.contrib.test-is/file-position">file-position</a> @@ -174,7 +176,7 @@ be created by deftest, set-test, or with-test. Use this to omit tests when compiling or loading production code.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L239" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -186,7 +188,7 @@ is thrown during a test. Defaults to nil, which means print the complete stack trace.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L246" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -232,7 +234,7 @@ Note: This breaks some reporting features, such as line numbers.</pre> method calls, or isolated symbols.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L434" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -247,7 +249,7 @@ evaluated. If the predicate returns false, the 'actual' form will be wrapped in (not...).</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L415" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -259,7 +261,7 @@ be wrapped in (not...).</pre> that combines their behavior.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L660" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -279,7 +281,7 @@ itself. When *load-tests* is false, deftest is ignored.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L593" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -290,7 +292,20 @@ When *load-tests* is false, deftest is ignored.</pre> <pre id="var-docstr">Like deftest but creates a private var.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L610" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="clojure.contrib.test-is/do-report">do-report</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (do-report m) +</pre> + <pre id="var-docstr">Add file and line information to a test result and call report. +If you are writing a custom assert-expr method, call this function +to pass test results to report.</pre> + <span class="var-added"><span id="content">Added in clojure-contrib version 1.2</span><br /></span> + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L335" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -313,10 +328,13 @@ expands to (do (check :a :b) (check :c :d))</pre> <pre id="var-usage">Usage: (file-position n) </pre> <pre id="var-docstr">Returns a vector [filename line-number] for the nth call up the -stack.</pre> +stack. + +Deprecated in 1.2: The information needed for test reporting is +now on :file and :line keys in the result map.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - - + <span class="var-deprecated"><span id="content">Deprecated since clojure-contrib version 1.2</span><br /></span> + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L276" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -373,7 +391,7 @@ any symbols starting with _</pre> a function (not a macro).</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L403" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -384,7 +402,7 @@ a function (not a macro).</pre> <pre id="var-docstr">Like var-get but returns nil if the var is unbound.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L395" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -396,7 +414,7 @@ a function (not a macro).</pre> Does nothing if *report-counters* is nil.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L308" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -420,7 +438,7 @@ thrown AND that the message on the exception matches (with re-find) the regular expression re.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L533" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -432,7 +450,7 @@ re-find) the regular expression re.</pre> fixture function, even if the collection is empty.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L667" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -447,7 +465,7 @@ the top of test_is.clj for more information on the types of arguments for 'report'.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L319" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -462,7 +480,7 @@ names matching the regular expression (with re-matches) will be tested.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L743" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -476,7 +494,7 @@ Defaults to current namespace if none given. Returns a map summarizing test results.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L731" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -491,7 +509,7 @@ The var must already exist. Does not modify the value of the var. When *load-tests* is false, set-test is ignored.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L619" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -503,7 +521,7 @@ When *load-tests* is false, set-test is ignored.</pre> were successful, false otherwise.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L752" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -525,7 +543,7 @@ were successful, false otherwise.</pre> <pre id="var-docstr">Calls test-var on every var interned in the namespace, with fixtures.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L694" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -542,7 +560,7 @@ Internally binds *report-counters* to a ref initialized to *report-counters*.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L706" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -554,7 +572,7 @@ Internally binds *report-counters* to a ref initialized to with *testing-vars* bound to (conj *testing-vars* v).</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L679" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -566,7 +584,7 @@ with *testing-vars* bound to (conj *testing-vars* v).</pre> but must occur inside a test function (deftest).</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L568" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -578,20 +596,20 @@ but must occur inside a test function (deftest).</pre> strings in *testing-contexts* with spaces.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L301" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> <h2 id="clojure.contrib.test-is/testing-vars-str">testing-vars-str</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (testing-vars-str) + <pre id="var-usage">Usage: (testing-vars-str m) </pre> <pre id="var-docstr">Returns a string representation of the current test. Renders names in *testing-vars* as a list, then the source file and line of current assertion.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L288" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -603,7 +621,7 @@ current assertion.</pre> You don't call this.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L517" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -615,7 +633,7 @@ teardown. Using a fixture-type of :each wraps every test individually, while:once wraps the whole run in a single function.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L641" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -630,7 +648,7 @@ When *load-tests* is false, only evaluates the definition, ignoring the tests.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L580" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -641,7 +659,7 @@ the tests.</pre> <pre id="var-docstr">Runs body with *out* bound to the value of *test-out*.</pre> <span class="var-added"><span id="content">Added in clojure-contrib version 1.1</span><br /></span> - + <a href="http://github.com/clojure/clojure-contrib/blob//src/main/clojure/clojure/test.clj#L267" id="var-source">Source</a> </div> |