-
-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathclojure.test.check.properties.html
48 lines (48 loc) · 6.18 KB
/
clojure.test.check.properties.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>clojure.test.check.properties documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css" /><div style="visibility: hidden;"><div class="klipse" data-external-libs="https://raw.githubusercontent.com/clojure/test.check/master/src/main/clojure">(ns my.test
(:require [clojure.test.check :as tc :refer [quick-check]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop :include-macros true]))</div></div><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Test.check</span> <span class="project-version">0.9.1-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="cheatsheet.html"><div class="inner"><span>test.check cheatsheet</span></div></a></li><li class="depth-1 "><a href="generator-examples.html"><div class="inner"><span>Generator Examples</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to test.check</span></div></a></li><li class="depth-1 "><a href="migrating-from-simple-check.html"><div class="inner"><span>Migrating from simple-check</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clojure</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></div></li><li class="depth-3"><a href="clojure.test.check.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>check</span></div></a></li><li class="depth-4 branch"><a href="clojure.test.check.clojure-test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clojure-test</span></div></a></li><li class="depth-4 branch"><a href="clojure.test.check.generators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>generators</span></div></a></li><li class="depth-4 current"><a href="clojure.test.check.properties.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>properties</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clojure.test.check.properties.html#var-for-all"><div class="inner"><span>for-all</span></div></a></li><li class="depth-1"><a href="clojure.test.check.properties.html#var-for-all*"><div class="inner"><span>for-all*</span></div></a></li></ul></div><div class="namespace-docs" id="content"><p id="klipse-loader-wrapper">Click <a id="klipse-loader" href="javascript:void(0)">here</a> to make these examples interactive with ClojureScript.</p><h1 class="anchor" id="top">clojure.test.check.properties</h1><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-for-all"><h3>for-all</h3><h4 class="type">macro</h4><div class="usage"><code>(for-all bindings & body)</code></div><div class="doc"><div class="markdown"><p>Macro sugar for <code>for-all*</code>. <code>for-all</code> lets you name the parameter and use them in expression, without wrapping them in a lambda. Like <code>for-all*</code>, it returns a property.</p>
<p>Examples</p>
<p>(for-all [a gen/int b gen/int] (>= (+ a b) a))</p></div></div></div><div class="public anchor" id="var-for-all*"><h3>for-all*</h3><div class="usage"><code>(for-all* args function)</code></div><div class="doc"><div class="markdown"><p>Creates a property (properties are also generators). A property is a generator that generates the result of applying the function under test with the realized arguments. Once realized, the arguments will be applied to <code>function</code> with <code>apply</code>.</p>
<p>Example:</p>
<p>(for-all* [gen/int gen/int] (fn [a b] (>= (+ a b) a)))</p></div></div></div></div><script>window.klipse_settings = {
selector: '.klipse,.clojure',
codemirror_options_in: {
lineWrapping: true,
autoCloseBrackets: true
},
codemirror_options_out: {
lineWrapping: true
}
};</script><script>
function klipseLocalStorageEnabled() {
var mod = 'modernizr';
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch (e) {
return false;
}
}
function klipseLoad() {
if (klipseLocalStorageEnabled()) { sessionStorage.setItem('klipse', true);}
$('#klipse-loader-wrapper').remove();
var s = document.createElement('script');
s.setAttribute('src','https://storage.googleapis.com/app.klipse.tech/plugin/js/klipse_plugin.js');
document.head.appendChild(s);
}
if(!true) {
klipseLoad();
} else {
if((klipseLocalStorageEnabled() && sessionStorage.getItem('klipse')) || window.location.search.match(/klipse=1/)) {
klipseLoad();
} else {
$('#klipse-loader').click(function(){
klipseLoad();
});
}
}
</script></body></html>