rushcheck 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/COPYING +515 -0
  2. data/INSTALL +14 -0
  3. data/LICENSE +5 -0
  4. data/README +49 -0
  5. data/Rakefile +39 -0
  6. data/copying.txt +23 -0
  7. data/data/rushcheck/doc/policy.txt +520 -0
  8. data/data/rushcheck/doc/rushcheck.txt +612 -0
  9. data/data/rushcheck/examples/printf.rb +22 -0
  10. data/data/rushcheck/examples/proc.rb +33 -0
  11. data/data/rushcheck/examples/roguetile.rb +153 -0
  12. data/data/rushcheck/examples/sample.rb +52 -0
  13. data/data/rushcheck/rdoc/classes/Arbitrary.html +148 -0
  14. data/data/rushcheck/rdoc/classes/Arbitrary.src/M000075.html +18 -0
  15. data/data/rushcheck/rdoc/classes/Assertion.html +183 -0
  16. data/data/rushcheck/rdoc/classes/Assertion.src/M000015.html +20 -0
  17. data/data/rushcheck/rdoc/classes/Assertion.src/M000016.html +45 -0
  18. data/data/rushcheck/rdoc/classes/Coarbitrary.html +135 -0
  19. data/data/rushcheck/rdoc/classes/Coarbitrary.src/M000095.html +18 -0
  20. data/data/rushcheck/rdoc/classes/FalseClass.html +177 -0
  21. data/data/rushcheck/rdoc/classes/FalseClass.src/M000018.html +18 -0
  22. data/data/rushcheck/rdoc/classes/FalseClass.src/M000019.html +18 -0
  23. data/data/rushcheck/rdoc/classes/FalseClass.src/M000020.html +18 -0
  24. data/data/rushcheck/rdoc/classes/Float.html +191 -0
  25. data/data/rushcheck/rdoc/classes/Float.src/M000047.html +21 -0
  26. data/data/rushcheck/rdoc/classes/Float.src/M000048.html +18 -0
  27. data/data/rushcheck/rdoc/classes/Float.src/M000049.html +22 -0
  28. data/data/rushcheck/rdoc/classes/Float.src/M000050.html +20 -0
  29. data/data/rushcheck/rdoc/classes/Gen.html +515 -0
  30. data/data/rushcheck/rdoc/classes/Gen.src/M000026.html +18 -0
  31. data/data/rushcheck/rdoc/classes/Gen.src/M000027.html +20 -0
  32. data/data/rushcheck/rdoc/classes/Gen.src/M000028.html +28 -0
  33. data/data/rushcheck/rdoc/classes/Gen.src/M000029.html +24 -0
  34. data/data/rushcheck/rdoc/classes/Gen.src/M000030.html +18 -0
  35. data/data/rushcheck/rdoc/classes/Gen.src/M000031.html +18 -0
  36. data/data/rushcheck/rdoc/classes/Gen.src/M000032.html +18 -0
  37. data/data/rushcheck/rdoc/classes/Gen.src/M000033.html +18 -0
  38. data/data/rushcheck/rdoc/classes/Gen.src/M000034.html +18 -0
  39. data/data/rushcheck/rdoc/classes/Gen.src/M000035.html +24 -0
  40. data/data/rushcheck/rdoc/classes/Gen.src/M000036.html +18 -0
  41. data/data/rushcheck/rdoc/classes/Gen.src/M000037.html +21 -0
  42. data/data/rushcheck/rdoc/classes/Gen.src/M000038.html +18 -0
  43. data/data/rushcheck/rdoc/classes/Gen.src/M000039.html +18 -0
  44. data/data/rushcheck/rdoc/classes/Gen.src/M000040.html +23 -0
  45. data/data/rushcheck/rdoc/classes/Gen.src/M000041.html +19 -0
  46. data/data/rushcheck/rdoc/classes/Gen.src/M000042.html +18 -0
  47. data/data/rushcheck/rdoc/classes/Gen.src/M000043.html +24 -0
  48. data/data/rushcheck/rdoc/classes/Guard.html +159 -0
  49. data/data/rushcheck/rdoc/classes/Guard.src/M000024.html +27 -0
  50. data/data/rushcheck/rdoc/classes/Guard.src/M000025.html +18 -0
  51. data/data/rushcheck/rdoc/classes/HsRandom.html +201 -0
  52. data/data/rushcheck/rdoc/classes/HsRandom.src/M000081.html +22 -0
  53. data/data/rushcheck/rdoc/classes/HsRandom.src/M000082.html +32 -0
  54. data/data/rushcheck/rdoc/classes/HsRandom.src/M000083.html +18 -0
  55. data/data/rushcheck/rdoc/classes/Integer.html +212 -0
  56. data/data/rushcheck/rdoc/classes/Integer.src/M000006.html +18 -0
  57. data/data/rushcheck/rdoc/classes/Integer.src/M000007.html +18 -0
  58. data/data/rushcheck/rdoc/classes/Integer.src/M000008.html +21 -0
  59. data/data/rushcheck/rdoc/classes/Integer.src/M000009.html +19 -0
  60. data/data/rushcheck/rdoc/classes/NilClass.html +177 -0
  61. data/data/rushcheck/rdoc/classes/NilClass.src/M000059.html +18 -0
  62. data/data/rushcheck/rdoc/classes/NilClass.src/M000060.html +18 -0
  63. data/data/rushcheck/rdoc/classes/NilClass.src/M000061.html +18 -0
  64. data/data/rushcheck/rdoc/classes/Property.html +174 -0
  65. data/data/rushcheck/rdoc/classes/Property.src/M000070.html +26 -0
  66. data/data/rushcheck/rdoc/classes/Property.src/M000071.html +18 -0
  67. data/data/rushcheck/rdoc/classes/RandomArray.html +184 -0
  68. data/data/rushcheck/rdoc/classes/RandomArray.src/M000021.html +18 -0
  69. data/data/rushcheck/rdoc/classes/RandomArray.src/M000022.html +35 -0
  70. data/data/rushcheck/rdoc/classes/RandomArray.src/M000023.html +22 -0
  71. data/data/rushcheck/rdoc/classes/RandomBool.html +146 -0
  72. data/data/rushcheck/rdoc/classes/RandomBool.src/M000079.html +18 -0
  73. data/data/rushcheck/rdoc/classes/RandomBool.src/M000080.html +19 -0
  74. data/data/rushcheck/rdoc/classes/RandomGen.html +196 -0
  75. data/data/rushcheck/rdoc/classes/RandomGen.src/M000076.html +18 -0
  76. data/data/rushcheck/rdoc/classes/RandomGen.src/M000077.html +18 -0
  77. data/data/rushcheck/rdoc/classes/RandomGen.src/M000078.html +18 -0
  78. data/data/rushcheck/rdoc/classes/RandomHash.html +197 -0
  79. data/data/rushcheck/rdoc/classes/RandomHash.src/M000044.html +18 -0
  80. data/data/rushcheck/rdoc/classes/RandomHash.src/M000045.html +26 -0
  81. data/data/rushcheck/rdoc/classes/RandomHash.src/M000046.html +22 -0
  82. data/data/rushcheck/rdoc/classes/RandomProc.html +192 -0
  83. data/data/rushcheck/rdoc/classes/RandomProc.src/M000055.html +18 -0
  84. data/data/rushcheck/rdoc/classes/RandomProc.src/M000056.html +30 -0
  85. data/data/rushcheck/rdoc/classes/RandomProc.src/M000057.html +26 -0
  86. data/data/rushcheck/rdoc/classes/RandomProc.src/M000058.html +20 -0
  87. data/data/rushcheck/rdoc/classes/Result.html +214 -0
  88. data/data/rushcheck/rdoc/classes/Result.src/M000051.html +18 -0
  89. data/data/rushcheck/rdoc/classes/Result.src/M000052.html +18 -0
  90. data/data/rushcheck/rdoc/classes/Result.src/M000053.html +18 -0
  91. data/data/rushcheck/rdoc/classes/RushCheckConfig.html +240 -0
  92. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000001.html +23 -0
  93. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000002.html +22 -0
  94. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000003.html +18 -0
  95. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000004.html +38 -0
  96. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000005.html +55 -0
  97. data/data/rushcheck/rdoc/classes/RushCheckGuard.html +118 -0
  98. data/data/rushcheck/rdoc/classes/SpecialString.html +151 -0
  99. data/data/rushcheck/rdoc/classes/SpecialString.src/M000017.html +37 -0
  100. data/data/rushcheck/rdoc/classes/StdGen.html +252 -0
  101. data/data/rushcheck/rdoc/classes/StdGen.src/M000010.html +23 -0
  102. data/data/rushcheck/rdoc/classes/StdGen.src/M000011.html +21 -0
  103. data/data/rushcheck/rdoc/classes/StdGen.src/M000012.html +21 -0
  104. data/data/rushcheck/rdoc/classes/StdGen.src/M000013.html +18 -0
  105. data/data/rushcheck/rdoc/classes/StdGen.src/M000014.html +18 -0
  106. data/data/rushcheck/rdoc/classes/String.html +191 -0
  107. data/data/rushcheck/rdoc/classes/String.src/M000066.html +24 -0
  108. data/data/rushcheck/rdoc/classes/String.src/M000067.html +18 -0
  109. data/data/rushcheck/rdoc/classes/String.src/M000068.html +25 -0
  110. data/data/rushcheck/rdoc/classes/String.src/M000069.html +22 -0
  111. data/data/rushcheck/rdoc/classes/Testable.html +281 -0
  112. data/data/rushcheck/rdoc/classes/Testable.src/M000084.html +18 -0
  113. data/data/rushcheck/rdoc/classes/Testable.src/M000085.html +18 -0
  114. data/data/rushcheck/rdoc/classes/Testable.src/M000088.html +18 -0
  115. data/data/rushcheck/rdoc/classes/Testable.src/M000089.html +18 -0
  116. data/data/rushcheck/rdoc/classes/Testable.src/M000090.html +18 -0
  117. data/data/rushcheck/rdoc/classes/Testable.src/M000092.html +18 -0
  118. data/data/rushcheck/rdoc/classes/Testable.src/M000094.html +18 -0
  119. data/data/rushcheck/rdoc/classes/TheStdGen.html +200 -0
  120. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000062.html +18 -0
  121. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000063.html +20 -0
  122. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000064.html +21 -0
  123. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000065.html +18 -0
  124. data/data/rushcheck/rdoc/classes/TrueClass.html +177 -0
  125. data/data/rushcheck/rdoc/classes/TrueClass.src/M000072.html +18 -0
  126. data/data/rushcheck/rdoc/classes/TrueClass.src/M000073.html +18 -0
  127. data/data/rushcheck/rdoc/classes/TrueClass.src/M000074.html +18 -0
  128. data/data/rushcheck/rdoc/created.rid +1 -0
  129. data/data/rushcheck/rdoc/files/rushcheck/arbitrary_rb.html +114 -0
  130. data/data/rushcheck/rdoc/files/rushcheck/array_rb.html +117 -0
  131. data/data/rushcheck/rdoc/files/rushcheck/assertion_rb.html +120 -0
  132. data/data/rushcheck/rdoc/files/rushcheck/bool_rb.html +120 -0
  133. data/data/rushcheck/rdoc/files/rushcheck/config_rb.html +109 -0
  134. data/data/rushcheck/rdoc/files/rushcheck/float_rb.html +118 -0
  135. data/data/rushcheck/rdoc/files/rushcheck/gen_rb.html +111 -0
  136. data/data/rushcheck/rdoc/files/rushcheck/guard_rb.html +108 -0
  137. data/data/rushcheck/rdoc/files/rushcheck/hash_rb.html +117 -0
  138. data/data/rushcheck/rdoc/files/rushcheck/integer_rb.html +118 -0
  139. data/data/rushcheck/rdoc/files/rushcheck/proc_rb.html +118 -0
  140. data/data/rushcheck/rdoc/files/rushcheck/property_rb.html +119 -0
  141. data/data/rushcheck/rdoc/files/rushcheck/random_rb.html +126 -0
  142. data/data/rushcheck/rdoc/files/rushcheck/result_rb.html +118 -0
  143. data/data/rushcheck/rdoc/files/rushcheck/rushcheck_rb.html +123 -0
  144. data/data/rushcheck/rdoc/files/rushcheck/string_rb.html +121 -0
  145. data/data/rushcheck/rdoc/files/rushcheck/testable_rb.html +117 -0
  146. data/data/rushcheck/rdoc/fr_class_index.html +51 -0
  147. data/data/rushcheck/rdoc/fr_file_index.html +43 -0
  148. data/data/rushcheck/rdoc/fr_method_index.html +121 -0
  149. data/data/rushcheck/rdoc/index.html +24 -0
  150. data/data/rushcheck/rdoc/rdoc-style.css +208 -0
  151. data/lib/rushcheck/arbitrary.rb +28 -0
  152. data/lib/rushcheck/array.rb +49 -0
  153. data/lib/rushcheck/assertion.rb +67 -0
  154. data/lib/rushcheck/bool.rb +90 -0
  155. data/lib/rushcheck/config.rb +98 -0
  156. data/lib/rushcheck/float.rb +43 -0
  157. data/lib/rushcheck/gen.rb +189 -0
  158. data/lib/rushcheck/guard.rb +27 -0
  159. data/lib/rushcheck/hash.rb +45 -0
  160. data/lib/rushcheck/integer.rb +43 -0
  161. data/lib/rushcheck/proc.rb +53 -0
  162. data/lib/rushcheck/property.rb +29 -0
  163. data/lib/rushcheck/random.rb +215 -0
  164. data/lib/rushcheck/result.rb +26 -0
  165. data/lib/rushcheck/rushcheck.rb +17 -0
  166. data/lib/rushcheck/string.rb +100 -0
  167. data/lib/rushcheck/testable.rb +41 -0
  168. metadata +238 -0
@@ -0,0 +1,43 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Files
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Files</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Files</h1>
22
+ <div id="index-entries">
23
+ <a href="files/rushcheck/arbitrary_rb.html">rushcheck/arbitrary.rb</a><br />
24
+ <a href="files/rushcheck/array_rb.html">rushcheck/array.rb</a><br />
25
+ <a href="files/rushcheck/assertion_rb.html">rushcheck/assertion.rb</a><br />
26
+ <a href="files/rushcheck/bool_rb.html">rushcheck/bool.rb</a><br />
27
+ <a href="files/rushcheck/config_rb.html">rushcheck/config.rb</a><br />
28
+ <a href="files/rushcheck/float_rb.html">rushcheck/float.rb</a><br />
29
+ <a href="files/rushcheck/gen_rb.html">rushcheck/gen.rb</a><br />
30
+ <a href="files/rushcheck/guard_rb.html">rushcheck/guard.rb</a><br />
31
+ <a href="files/rushcheck/hash_rb.html">rushcheck/hash.rb</a><br />
32
+ <a href="files/rushcheck/integer_rb.html">rushcheck/integer.rb</a><br />
33
+ <a href="files/rushcheck/proc_rb.html">rushcheck/proc.rb</a><br />
34
+ <a href="files/rushcheck/property_rb.html">rushcheck/property.rb</a><br />
35
+ <a href="files/rushcheck/random_rb.html">rushcheck/random.rb</a><br />
36
+ <a href="files/rushcheck/result_rb.html">rushcheck/result.rb</a><br />
37
+ <a href="files/rushcheck/rushcheck_rb.html">rushcheck/rushcheck.rb</a><br />
38
+ <a href="files/rushcheck/string_rb.html">rushcheck/string.rb</a><br />
39
+ <a href="files/rushcheck/testable_rb.html">rushcheck/testable.rb</a><br />
40
+ </div>
41
+ </div>
42
+ </body>
43
+ </html>
@@ -0,0 +1,121 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Methods
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Methods</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Methods</h1>
22
+ <div id="index-entries">
23
+ <a href="classes/RandomArray.html#M000022">arbitrary (RandomArray)</a><br />
24
+ <a href="classes/Float.html#M000047">arbitrary (Float)</a><br />
25
+ <a href="classes/SpecialString.html#M000017">arbitrary (SpecialString)</a><br />
26
+ <a href="classes/RandomHash.html#M000045">arbitrary (RandomHash)</a><br />
27
+ <a href="classes/Arbitrary.html#M000075">arbitrary (Arbitrary)</a><br />
28
+ <a href="classes/String.html#M000066">arbitrary (String)</a><br />
29
+ <a href="classes/Integer.html#M000007">arbitrary (Integer)</a><br />
30
+ <a href="classes/RandomBool.html#M000079">arbitrary (RandomBool)</a><br />
31
+ <a href="classes/NilClass.html#M000059">arbitrary (NilClass)</a><br />
32
+ <a href="classes/RandomProc.html#M000056">arbitrary (RandomProc)</a><br />
33
+ <a href="classes/Gen.html#M000037">bind (Gen)</a><br />
34
+ <a href="classes/Float.html#M000048">bound (Float)</a><br />
35
+ <a href="classes/String.html#M000067">bound (String)</a><br />
36
+ <a href="classes/FalseClass.html#M000018">bound (FalseClass)</a><br />
37
+ <a href="classes/Integer.html#M000006">bound (Integer)</a><br />
38
+ <a href="classes/TrueClass.html#M000072">bound (TrueClass)</a><br />
39
+ <a href="classes/Testable.html#M000085">check (Testable)</a><br />
40
+ <a href="classes/Gen.html#M000026">choose (Gen)</a><br />
41
+ <a href="classes/Testable.html#M000088">classify (Testable)</a><br />
42
+ <a href="classes/Coarbitrary.html#M000095">coarbitrary (Coarbitrary)</a><br />
43
+ <a href="classes/FalseClass.html#M000019">coarbitrary (FalseClass)</a><br />
44
+ <a href="classes/String.html#M000069">coarbitrary (String)</a><br />
45
+ <a href="classes/RandomArray.html#M000023">coarbitrary (RandomArray)</a><br />
46
+ <a href="classes/TrueClass.html#M000073">coarbitrary (TrueClass)</a><br />
47
+ <a href="classes/RandomHash.html#M000046">coarbitrary (RandomHash)</a><br />
48
+ <a href="classes/Integer.html#M000009">coarbitrary (Integer)</a><br />
49
+ <a href="classes/Float.html#M000050">coarbitrary (Float)</a><br />
50
+ <a href="classes/RandomProc.html#M000057">coarbitrary (RandomProc)</a><br />
51
+ <a href="classes/NilClass.html#M000060">coarbitrary (NilClass)</a><br />
52
+ <a href="classes/Testable.html#M000091">collect (Testable)</a><br />
53
+ <a href="classes/RushCheckConfig.html#M000004">done (RushCheckConfig)</a><br />
54
+ <a href="classes/Gen.html#M000027">elements (Gen)</a><br />
55
+ <a href="classes/Gen.html#M000039">fmap (Gen)</a><br />
56
+ <a href="classes/Gen.html#M000040">forall (Gen)</a><br />
57
+ <a href="classes/Gen.html#M000028">frequency (Gen)</a><br />
58
+ <a href="classes/TheStdGen.html#M000063">gen_next (TheStdGen)</a><br />
59
+ <a href="classes/RandomGen.html#M000076">gen_next (RandomGen)</a><br />
60
+ <a href="classes/StdGen.html#M000011">gen_next (StdGen)</a><br />
61
+ <a href="classes/RandomGen.html#M000078">gen_range (RandomGen)</a><br />
62
+ <a href="classes/TheStdGen.html#M000065">gen_range (TheStdGen)</a><br />
63
+ <a href="classes/StdGen.html#M000013">gen_range (StdGen)</a><br />
64
+ <a href="classes/Gen.html#M000041">generate (Gen)</a><br />
65
+ <a href="classes/Guard.html#M000025">guard (Guard)</a><br />
66
+ <a href="classes/Guard.html#M000024">guard_raise (Guard)</a><br />
67
+ <a href="classes/Testable.html#M000089">imply (Testable)</a><br />
68
+ <a href="classes/Testable.html#M000090">label (Testable)</a><br />
69
+ <a href="classes/Gen.html#M000029">lift_array (Gen)</a><br />
70
+ <a href="classes/Gen.html#M000036">new (Gen)</a><br />
71
+ <a href="classes/TheStdGen.html#M000062">new (TheStdGen)</a><br />
72
+ <a href="classes/RushCheckConfig.html#M000003">new (RushCheckConfig)</a><br />
73
+ <a href="classes/Assertion.html#M000015">new (Assertion)</a><br />
74
+ <a href="classes/Property.html#M000070">new (Property)</a><br />
75
+ <a href="classes/StdGen.html#M000010">new (StdGen)</a><br />
76
+ <a href="classes/Result.html#M000052">new (Result)</a><br />
77
+ <a href="classes/Result.html#M000051">nothing (Result)</a><br />
78
+ <a href="classes/Gen.html#M000030">oneof (Gen)</a><br />
79
+ <a href="classes/Gen.html#M000031">promote (Gen)</a><br />
80
+ <a href="classes/NilClass.html#M000061">property (NilClass)</a><br />
81
+ <a href="classes/Property.html#M000071">property (Property)</a><br />
82
+ <a href="classes/Result.html#M000054">property (Result)</a><br />
83
+ <a href="classes/RandomProc.html#M000058">property (RandomProc)</a><br />
84
+ <a href="classes/Testable.html#M000084">property (Testable)</a><br />
85
+ <a href="classes/Assertion.html#M000016">property (Assertion)</a><br />
86
+ <a href="classes/FalseClass.html#M000020">property (FalseClass)</a><br />
87
+ <a href="classes/TrueClass.html#M000074">property (TrueClass)</a><br />
88
+ <a href="classes/RushCheckConfig.html#M000001">quick (RushCheckConfig)</a><br />
89
+ <a href="classes/Testable.html#M000086">quick_check (Testable)</a><br />
90
+ <a href="classes/Testable.html#M000087">quickcheck (Testable)</a><br />
91
+ <a href="classes/Gen.html#M000032">rand (Gen)</a><br />
92
+ <a href="classes/HsRandom.html#M000081">random (HsRandom)</a><br />
93
+ <a href="classes/HsRandom.html#M000082">random_array (HsRandom)</a><br />
94
+ <a href="classes/Integer.html#M000008">random_range (Integer)</a><br />
95
+ <a href="classes/String.html#M000068">random_range (String)</a><br />
96
+ <a href="classes/RandomBool.html#M000080">random_range (RandomBool)</a><br />
97
+ <a href="classes/Float.html#M000049">random_range (Float)</a><br />
98
+ <a href="classes/HsRandom.html#M000083">random_std (HsRandom)</a><br />
99
+ <a href="classes/Gen.html#M000042">resize (Gen)</a><br />
100
+ <a href="classes/Result.html#M000053">result (Result)</a><br />
101
+ <a href="classes/RandomArray.html#M000021">set_pattern (RandomArray)</a><br />
102
+ <a href="classes/RandomHash.html#M000044">set_pattern (RandomHash)</a><br />
103
+ <a href="classes/RandomProc.html#M000055">set_pattern (RandomProc)</a><br />
104
+ <a href="classes/Gen.html#M000033">sized (Gen)</a><br />
105
+ <a href="classes/RandomGen.html#M000077">split (RandomGen)</a><br />
106
+ <a href="classes/TheStdGen.html#M000064">split (TheStdGen)</a><br />
107
+ <a href="classes/StdGen.html#M000012">split (StdGen)</a><br />
108
+ <a href="classes/Testable.html#M000092">test (Testable)</a><br />
109
+ <a href="classes/RushCheckConfig.html#M000005">tests (RushCheckConfig)</a><br />
110
+ <a href="classes/StdGen.html#M000014">to_s (StdGen)</a><br />
111
+ <a href="classes/Testable.html#M000094">trivial (Testable)</a><br />
112
+ <a href="classes/Gen.html#M000034">unit (Gen)</a><br />
113
+ <a href="classes/Gen.html#M000038">value (Gen)</a><br />
114
+ <a href="classes/Gen.html#M000043">variant (Gen)</a><br />
115
+ <a href="classes/Gen.html#M000035">vector (Gen)</a><br />
116
+ <a href="classes/RushCheckConfig.html#M000002">verbose (RushCheckConfig)</a><br />
117
+ <a href="classes/Testable.html#M000093">verbose_check (Testable)</a><br />
118
+ </div>
119
+ </div>
120
+ </body>
121
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+
6
+ <!--
7
+
8
+ RDoc Documentation
9
+
10
+ -->
11
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
12
+ <head>
13
+ <title>RDoc Documentation</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ </head>
16
+ <frameset rows="20%, 80%">
17
+ <frameset cols="25%,35%,45%">
18
+ <frame src="fr_file_index.html" title="Files" name="Files" />
19
+ <frame src="fr_class_index.html" name="Classes" />
20
+ <frame src="fr_method_index.html" name="Methods" />
21
+ </frameset>
22
+ <frame src="files/rushcheck/arbitrary_rb.html" name="docwin" />
23
+ </frameset>
24
+ </html>
@@ -0,0 +1,208 @@
1
+
2
+ body {
3
+ font-family: Verdana,Arial,Helvetica,sans-serif;
4
+ font-size: 90%;
5
+ margin: 0;
6
+ margin-left: 40px;
7
+ padding: 0;
8
+ background: white;
9
+ }
10
+
11
+ h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
12
+ h1 { font-size: 150%; }
13
+ h2,h3,h4 { margin-top: 1em; }
14
+
15
+ a { background: #eef; color: #039; text-decoration: none; }
16
+ a:hover { background: #039; color: #eef; }
17
+
18
+ /* Override the base stylesheet's Anchor inside a table cell */
19
+ td > a {
20
+ background: transparent;
21
+ color: #039;
22
+ text-decoration: none;
23
+ }
24
+
25
+ /* and inside a section title */
26
+ .section-title > a {
27
+ background: transparent;
28
+ color: #eee;
29
+ text-decoration: none;
30
+ }
31
+
32
+ /* === Structural elements =================================== */
33
+
34
+ div#index {
35
+ margin: 0;
36
+ margin-left: -40px;
37
+ padding: 0;
38
+ font-size: 90%;
39
+ }
40
+
41
+
42
+ div#index a {
43
+ margin-left: 0.7em;
44
+ }
45
+
46
+ div#index .section-bar {
47
+ margin-left: 0px;
48
+ padding-left: 0.7em;
49
+ background: #ccc;
50
+ font-size: small;
51
+ }
52
+
53
+
54
+ div#classHeader, div#fileHeader {
55
+ width: auto;
56
+ color: white;
57
+ padding: 0.5em 1.5em 0.5em 1.5em;
58
+ margin: 0;
59
+ margin-left: -40px;
60
+ border-bottom: 3px solid #006;
61
+ }
62
+
63
+ div#classHeader a, div#fileHeader a {
64
+ background: inherit;
65
+ color: white;
66
+ }
67
+
68
+ div#classHeader td, div#fileHeader td {
69
+ background: inherit;
70
+ color: white;
71
+ }
72
+
73
+
74
+ div#fileHeader {
75
+ background: #057;
76
+ }
77
+
78
+ div#classHeader {
79
+ background: #048;
80
+ }
81
+
82
+
83
+ .class-name-in-header {
84
+ font-size: 180%;
85
+ font-weight: bold;
86
+ }
87
+
88
+
89
+ div#bodyContent {
90
+ padding: 0 1.5em 0 1.5em;
91
+ }
92
+
93
+ div#description {
94
+ padding: 0.5em 1.5em;
95
+ background: #efefef;
96
+ border: 1px dotted #999;
97
+ }
98
+
99
+ div#description h1,h2,h3,h4,h5,h6 {
100
+ color: #125;;
101
+ background: transparent;
102
+ }
103
+
104
+ div#validator-badges {
105
+ text-align: center;
106
+ }
107
+ div#validator-badges img { border: 0; }
108
+
109
+ div#copyright {
110
+ color: #333;
111
+ background: #efefef;
112
+ font: 0.75em sans-serif;
113
+ margin-top: 5em;
114
+ margin-bottom: 0;
115
+ padding: 0.5em 2em;
116
+ }
117
+
118
+
119
+ /* === Classes =================================== */
120
+
121
+ table.header-table {
122
+ color: white;
123
+ font-size: small;
124
+ }
125
+
126
+ .type-note {
127
+ font-size: small;
128
+ color: #DEDEDE;
129
+ }
130
+
131
+ .xxsection-bar {
132
+ background: #eee;
133
+ color: #333;
134
+ padding: 3px;
135
+ }
136
+
137
+ .section-bar {
138
+ color: #333;
139
+ border-bottom: 1px solid #999;
140
+ margin-left: -20px;
141
+ }
142
+
143
+
144
+ .section-title {
145
+ background: #79a;
146
+ color: #eee;
147
+ padding: 3px;
148
+ margin-top: 2em;
149
+ margin-left: -30px;
150
+ border: 1px solid #999;
151
+ }
152
+
153
+ .top-aligned-row { vertical-align: top }
154
+ .bottom-aligned-row { vertical-align: bottom }
155
+
156
+ /* --- Context section classes ----------------------- */
157
+
158
+ .context-row { }
159
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
160
+ .context-item-value { font-size: small; color: #448; }
161
+ .context-item-desc { color: #333; padding-left: 2em; }
162
+
163
+ /* --- Method classes -------------------------- */
164
+ .method-detail {
165
+ background: #efefef;
166
+ padding: 0;
167
+ margin-top: 0.5em;
168
+ margin-bottom: 1em;
169
+ border: 1px dotted #ccc;
170
+ }
171
+ .method-heading {
172
+ color: black;
173
+ background: #ccc;
174
+ border-bottom: 1px solid #666;
175
+ padding: 0.2em 0.5em 0 0.5em;
176
+ }
177
+ .method-signature { color: black; background: inherit; }
178
+ .method-name { font-weight: bold; }
179
+ .method-args { font-style: italic; }
180
+ .method-description { padding: 0 0.5em 0 0.5em; }
181
+
182
+ /* --- Source code sections -------------------- */
183
+
184
+ a.source-toggle { font-size: 90%; }
185
+ div.method-source-code {
186
+ background: #262626;
187
+ color: #ffdead;
188
+ margin: 1em;
189
+ padding: 0.5em;
190
+ border: 1px dashed #999;
191
+ overflow: hidden;
192
+ }
193
+
194
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
195
+
196
+ /* --- Ruby keyword styles --------------------- */
197
+
198
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
199
+
200
+ .ruby-constant { color: #7fffd4; background: transparent; }
201
+ .ruby-keyword { color: #00ffff; background: transparent; }
202
+ .ruby-ivar { color: #eedd82; background: transparent; }
203
+ .ruby-operator { color: #00ffee; background: transparent; }
204
+ .ruby-identifier { color: #ffdead; background: transparent; }
205
+ .ruby-node { color: #ffa07a; background: transparent; }
206
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
207
+ .ruby-regexp { color: #ffa07a; background: transparent; }
208
+ .ruby-value { color: #7fffd4; background: transparent; }
@@ -0,0 +1,28 @@
1
+ # = arbitrary.rb
2
+ #
3
+ # This file includes two modules Arbitrary and Coarbitrary.
4
+ # Arbitrary provides an instance method arbitrary.
5
+ # Coarbitrary provides a class method coarbitrary.
6
+ # However they are abstract methods and should be overrided
7
+ # in each class after include/extend them.
8
+
9
+ module Arbitrary
10
+
11
+ # It is assumed that the arbitrary method must be overrided
12
+ # and return a Gen object with the same class of self.
13
+ # See also rushcheck/gen.rb.
14
+ def arbitrary
15
+ raise(NotImplementedError, "This method should be overrided.")
16
+ end
17
+
18
+ end
19
+
20
+ module Coarbitrary
21
+
22
+ # It is assumed that the coarbitrary method must be overrided
23
+ # and return a Gen object. See also rushcheck/gen.rb.
24
+ def coarbitrary(g)
25
+ raise(NotImplementedError, "This method should be overrided.")
26
+ end
27
+
28
+ end
@@ -0,0 +1,49 @@
1
+ # = array.rb
2
+ # The file provides a random generator of arrays.
3
+
4
+ require 'rushcheck/arbitrary'
5
+ require 'rushcheck/gen'
6
+ require 'rushcheck/testable'
7
+
8
+ # class RandomArray acts a random generator of arrays.
9
+ # Programmer can make a subclass of RandomArray to get
10
+ # user defined generators.
11
+ class RandomArray < Array
12
+
13
+ extend Arbitrary
14
+ include Coarbitrary
15
+
16
+ def self.set_pattern(base, &f)
17
+ @@base, @@indp = base, f
18
+ end
19
+
20
+ def self.arbitrary
21
+ Gen.sized do |m|
22
+ Gen.choose(0..m) do |len|
23
+ if len = 0
24
+ then Gen.unit([])
25
+ else
26
+ Gen.new do |n, r|
27
+ ary = [@@base.arbitrary.value(n, r)]
28
+ r2 = r
29
+ (1..len).each do |i|
30
+ r1, r2 = r2.split
31
+ ary << @@indp.call(ary, i).arbitrary.value(n, r1)
32
+ end
33
+
34
+ ary
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+
41
+ def coarbitrary(g)
42
+ r = g.variant(0)
43
+ each do |c|
44
+ r = c.coarbitrary(r.variant(1))
45
+ end
46
+ r
47
+ end
48
+
49
+ end
@@ -0,0 +1,67 @@
1
+ # = assertion.rb
2
+ # this file provides a class Assertion for random testing.
3
+
4
+ require 'rushcheck/gen'
5
+ require 'rushcheck/guard'
6
+ require 'rushcheck/property'
7
+ require 'rushcheck/result'
8
+ require 'rushcheck/testable'
9
+
10
+ # Assertion class is one of main features of RushCheck.
11
+ # You can write a testcase for random testing as follows:
12
+ #
13
+ # Assertion.new(Integer, String) do |x, y, g|
14
+ # g.guard { precondition }
15
+ # body
16
+ # end
17
+ #
18
+ # See also documents and several examples.
19
+ #
20
+ class Assertion
21
+
22
+ include Testable
23
+
24
+ def initialize(*xs, &f)
25
+ @inputs = xs[0..(f.arity - 1)]
26
+ @nguard = f.arity - xs.length
27
+ @proc = f
28
+ end
29
+
30
+ def property
31
+ Property.new(Gen.new do |n, r|
32
+ r2 = r
33
+ if @inputs
34
+ then
35
+ @inputs.map do |c|
36
+ r1, r2 = r2.split
37
+ c.arbitrary.value(n, r1)
38
+ end
39
+ else
40
+ []
41
+ end
42
+ end.bind do |args|
43
+ guards = @nguard >= 0 ? Array.new(@nguard, Guard.new) : []
44
+ test = begin
45
+ xs = args + guards
46
+ @proc.call(*xs)
47
+ rescue Exception => ex
48
+ case ex
49
+ when RushCheckGuard
50
+ Result.new(nil)
51
+ else
52
+ err = "Unexpected exception: #{ex.inspect}\n" +
53
+ ex.backtrace.join("\n")
54
+ Result.new(false, [], [err])
55
+ end
56
+ end
57
+ # not use ensure here because ensure clause
58
+ # does not return values
59
+ test.property.gen.bind do |res|
60
+ res.arguments << args.inspect
61
+ Gen.unit(res)
62
+ end
63
+ end)
64
+ end
65
+
66
+ end
67
+
@@ -0,0 +1,90 @@
1
+ # This file extends the default Ruby's class TrueClass and FalseClass
2
+ # for RushCheck.
3
+
4
+ require 'rushcheck/arbitrary'
5
+ require 'rushcheck/integer'
6
+ require 'rushcheck/random'
7
+ require 'rushcheck/result'
8
+ require 'rushcheck/testable'
9
+
10
+ module RandomBool
11
+ def arbitrary
12
+ Gen.elements([true, false])
13
+ end
14
+
15
+ def random_range(gen, lo=@@min_bound, hi=@@max_bound)
16
+ v, g = Integer.random_range(gen, 0, 1)
17
+ [v==0, g]
18
+ end
19
+ end
20
+
21
+ class TrueClass
22
+
23
+ extend Arbitrary
24
+ extend HsRandom
25
+ extend RandomBool
26
+
27
+ include Testable
28
+ include Coarbitrary
29
+
30
+ @@min_bound = 0
31
+ @@max_bound = 1
32
+
33
+ def self.bound
34
+ [@@min_bound, @@max_bound]
35
+ end
36
+
37
+ def coarbitrary(g)
38
+ g.variant(0)
39
+ end
40
+
41
+ def property
42
+ Result.new(self).result
43
+ end
44
+
45
+ end
46
+
47
+ class FalseClass
48
+
49
+ extend Arbitrary
50
+ extend HsRandom
51
+ extend RandomBool
52
+
53
+ include Coarbitrary
54
+ include Testable
55
+
56
+ @@min_bound = 0
57
+ @@max_bound = 1
58
+
59
+ def self.bound
60
+ [@@min_bound, @@max_bound]
61
+ end
62
+
63
+ def coarbitrary(g)
64
+ g.variant(1)
65
+ end
66
+
67
+ def property
68
+ Result.new(self).result
69
+ end
70
+ end
71
+
72
+ class NilClass
73
+ extend Arbitrary
74
+
75
+ include Coarbitrary
76
+ include Testable
77
+
78
+ def self.arbitrary
79
+ Gen.unit(nil)
80
+ end
81
+
82
+ def coarbitrary(g)
83
+ g.variant(0)
84
+ end
85
+
86
+ def property
87
+ Result.nothing
88
+ end
89
+
90
+ end