rushcheck 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/Rakefile +1 -1
  2. data/data/rushcheck/doc/policy.txt +107 -0
  3. data/data/rushcheck/doc/rushcheck.thtml +832 -0
  4. data/data/rushcheck/examples/candy.rb +6 -8
  5. data/data/rushcheck/examples/printf.rb +3 -3
  6. data/data/rushcheck/examples/proc.rb +4 -4
  7. data/data/rushcheck/examples/roguetile.rb +16 -16
  8. data/data/rushcheck/examples/sample.rb +10 -10
  9. data/data/rushcheck/rdoc/classes/Arbitrary.html +5 -5
  10. data/data/rushcheck/rdoc/classes/Arbitrary.src/M000082.html +18 -0
  11. data/data/rushcheck/rdoc/classes/Assertion.html +11 -11
  12. data/data/rushcheck/rdoc/classes/Assertion.src/M000019.html +20 -0
  13. data/data/rushcheck/rdoc/classes/Assertion.src/M000020.html +50 -0
  14. data/data/rushcheck/rdoc/classes/Coarbitrary.html +5 -5
  15. data/data/rushcheck/rdoc/classes/Coarbitrary.src/M000105.html +18 -0
  16. data/data/rushcheck/rdoc/classes/FalseClass.html +15 -15
  17. data/data/rushcheck/rdoc/classes/FalseClass.src/M000022.html +18 -0
  18. data/data/rushcheck/rdoc/classes/FalseClass.src/M000023.html +18 -0
  19. data/data/rushcheck/rdoc/classes/FalseClass.src/M000024.html +18 -0
  20. data/data/rushcheck/rdoc/classes/Float.html +20 -20
  21. data/data/rushcheck/rdoc/classes/Float.src/M000052.html +21 -0
  22. data/data/rushcheck/rdoc/classes/Float.src/M000053.html +18 -0
  23. data/data/rushcheck/rdoc/classes/Float.src/M000054.html +22 -0
  24. data/data/rushcheck/rdoc/classes/Float.src/M000055.html +20 -0
  25. data/data/rushcheck/rdoc/classes/Gen.html +102 -102
  26. data/data/rushcheck/rdoc/classes/Gen.src/M000030.html +4 -10
  27. data/data/rushcheck/rdoc/classes/Gen.src/M000031.html +29 -4
  28. data/data/rushcheck/rdoc/classes/Gen.src/M000032.html +6 -4
  29. data/data/rushcheck/rdoc/classes/Gen.src/M000033.html +14 -4
  30. data/data/rushcheck/rdoc/classes/Gen.src/M000034.html +10 -4
  31. data/data/rushcheck/rdoc/classes/Gen.src/M000035.html +4 -4
  32. data/data/rushcheck/rdoc/classes/Gen.src/M000036.html +4 -10
  33. data/data/rushcheck/rdoc/classes/Gen.src/M000037.html +4 -4
  34. data/data/rushcheck/rdoc/classes/Gen.src/M000038.html +4 -7
  35. data/data/rushcheck/rdoc/classes/Gen.src/M000039.html +4 -4
  36. data/data/rushcheck/rdoc/classes/Gen.src/M000040.html +10 -4
  37. data/data/rushcheck/rdoc/classes/Gen.src/M000041.html +4 -9
  38. data/data/rushcheck/rdoc/classes/Gen.src/M000042.html +7 -5
  39. data/data/rushcheck/rdoc/classes/Gen.src/M000043.html +4 -4
  40. data/data/rushcheck/rdoc/classes/Gen.src/M000044.html +4 -10
  41. data/data/rushcheck/rdoc/classes/Gen.src/M000045.html +23 -0
  42. data/data/rushcheck/rdoc/classes/Gen.src/M000046.html +19 -0
  43. data/data/rushcheck/rdoc/classes/Gen.src/M000047.html +18 -0
  44. data/data/rushcheck/rdoc/classes/Gen.src/M000048.html +24 -0
  45. data/data/rushcheck/rdoc/classes/Guard.html +10 -10
  46. data/data/rushcheck/rdoc/classes/Guard.src/M000028.html +27 -0
  47. data/data/rushcheck/rdoc/classes/Guard.src/M000029.html +18 -0
  48. data/data/rushcheck/rdoc/classes/HsRandom.html +20 -20
  49. data/data/rushcheck/rdoc/classes/HsRandom.src/M000088.html +22 -0
  50. data/data/rushcheck/rdoc/classes/HsRandom.src/M000089.html +32 -0
  51. data/data/rushcheck/rdoc/classes/HsRandom.src/M000090.html +18 -0
  52. data/data/rushcheck/rdoc/classes/Integer.html +20 -20
  53. data/data/rushcheck/rdoc/classes/Integer.src/M000010.html +18 -0
  54. data/data/rushcheck/rdoc/classes/Integer.src/M000011.html +18 -0
  55. data/data/rushcheck/rdoc/classes/Integer.src/M000012.html +21 -0
  56. data/data/rushcheck/rdoc/classes/Integer.src/M000013.html +19 -0
  57. data/data/rushcheck/rdoc/classes/NilClass.html +15 -15
  58. data/data/rushcheck/rdoc/classes/NilClass.src/M000064.html +18 -0
  59. data/data/rushcheck/rdoc/classes/NilClass.src/M000065.html +18 -0
  60. data/data/rushcheck/rdoc/classes/NilClass.src/M000066.html +18 -0
  61. data/data/rushcheck/rdoc/classes/Property.html +10 -10
  62. data/data/rushcheck/rdoc/classes/Property.src/M000077.html +26 -0
  63. data/data/rushcheck/rdoc/classes/Property.src/M000078.html +18 -0
  64. data/data/rushcheck/rdoc/classes/RandomArray.html +15 -15
  65. data/data/rushcheck/rdoc/classes/RandomArray.src/M000025.html +18 -0
  66. data/data/rushcheck/rdoc/classes/RandomArray.src/M000026.html +35 -0
  67. data/data/rushcheck/rdoc/classes/RandomArray.src/M000027.html +22 -0
  68. data/data/rushcheck/rdoc/classes/RandomBool.html +10 -10
  69. data/data/rushcheck/rdoc/classes/RandomBool.src/M000086.html +18 -0
  70. data/data/rushcheck/rdoc/classes/RandomBool.src/M000087.html +19 -0
  71. data/data/rushcheck/rdoc/classes/RandomGen.html +20 -20
  72. data/data/rushcheck/rdoc/classes/RandomGen.src/M000083.html +18 -0
  73. data/data/rushcheck/rdoc/classes/RandomGen.src/M000084.html +18 -0
  74. data/data/rushcheck/rdoc/classes/RandomGen.src/M000085.html +18 -0
  75. data/data/rushcheck/rdoc/classes/RandomHash.html +16 -16
  76. data/data/rushcheck/rdoc/classes/RandomHash.src/M000049.html +18 -0
  77. data/data/rushcheck/rdoc/classes/RandomHash.src/M000050.html +26 -0
  78. data/data/rushcheck/rdoc/classes/RandomHash.src/M000051.html +22 -0
  79. data/data/rushcheck/rdoc/classes/RandomProc.html +20 -20
  80. data/data/rushcheck/rdoc/classes/RandomProc.src/M000060.html +18 -0
  81. data/data/rushcheck/rdoc/classes/RandomProc.src/M000061.html +30 -0
  82. data/data/rushcheck/rdoc/classes/RandomProc.src/M000062.html +26 -0
  83. data/data/rushcheck/rdoc/classes/RandomProc.src/M000063.html +20 -0
  84. data/data/rushcheck/rdoc/classes/Result.html +19 -19
  85. data/data/rushcheck/rdoc/classes/Result.src/M000056.html +18 -0
  86. data/data/rushcheck/rdoc/classes/Result.src/M000057.html +18 -0
  87. data/data/rushcheck/rdoc/classes/Result.src/M000058.html +18 -0
  88. data/data/rushcheck/rdoc/classes/RushCheckConfig.html +41 -11
  89. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000001.html +1 -1
  90. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000002.html +1 -1
  91. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000003.html +8 -4
  92. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000004.html +4 -24
  93. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000005.html +22 -39
  94. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000006.html +55 -0
  95. data/data/rushcheck/rdoc/classes/RushCheckConfig.src/M000007.html +50 -0
  96. data/data/rushcheck/rdoc/classes/SpecialString.html +5 -5
  97. data/data/rushcheck/rdoc/classes/SpecialString.src/M000021.html +37 -0
  98. data/data/rushcheck/rdoc/classes/StdGen.html +27 -27
  99. data/data/rushcheck/rdoc/classes/StdGen.src/M000014.html +9 -4
  100. data/data/rushcheck/rdoc/classes/StdGen.src/M000015.html +21 -0
  101. data/data/rushcheck/rdoc/classes/StdGen.src/M000016.html +21 -0
  102. data/data/rushcheck/rdoc/classes/StdGen.src/M000017.html +18 -0
  103. data/data/rushcheck/rdoc/classes/StdGen.src/M000018.html +18 -0
  104. data/data/rushcheck/rdoc/classes/String.html +20 -20
  105. data/data/rushcheck/rdoc/classes/String.src/M000073.html +24 -0
  106. data/data/rushcheck/rdoc/classes/String.src/M000074.html +18 -0
  107. data/data/rushcheck/rdoc/classes/String.src/M000075.html +25 -0
  108. data/data/rushcheck/rdoc/classes/String.src/M000076.html +22 -0
  109. data/data/rushcheck/rdoc/classes/TestExausted.html +113 -0
  110. data/data/rushcheck/rdoc/classes/TestFailed.html +155 -0
  111. data/data/rushcheck/rdoc/classes/TestFailed.src/M000067.html +18 -0
  112. data/data/rushcheck/rdoc/classes/TestOk.html +113 -0
  113. data/data/rushcheck/rdoc/classes/TestOptions.html +180 -0
  114. data/data/rushcheck/rdoc/classes/TestOptions.src/M000008.html +18 -0
  115. data/data/rushcheck/rdoc/classes/TestOptions.src/M000009.html +18 -0
  116. data/data/rushcheck/rdoc/classes/TestResult.html +164 -0
  117. data/data/rushcheck/rdoc/classes/TestResult.src/M000068.html +18 -0
  118. data/data/rushcheck/rdoc/classes/Testable.html +96 -51
  119. data/data/rushcheck/rdoc/classes/Testable.src/M000091.html +4 -4
  120. data/data/rushcheck/rdoc/classes/Testable.src/M000092.html +4 -4
  121. data/data/rushcheck/rdoc/classes/Testable.src/M000095.html +4 -4
  122. data/data/rushcheck/rdoc/classes/Testable.src/M000096.html +18 -0
  123. data/data/rushcheck/rdoc/classes/Testable.src/M000097.html +18 -0
  124. data/data/rushcheck/rdoc/classes/Testable.src/M000099.html +19 -0
  125. data/data/rushcheck/rdoc/classes/Testable.src/M000100.html +21 -0
  126. data/data/rushcheck/rdoc/classes/Testable.src/M000101.html +18 -0
  127. data/data/rushcheck/rdoc/classes/Testable.src/M000103.html +18 -0
  128. data/data/rushcheck/rdoc/classes/Testable.src/M000104.html +18 -0
  129. data/data/rushcheck/rdoc/classes/TheStdGen.html +20 -20
  130. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000069.html +18 -0
  131. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000070.html +20 -0
  132. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000071.html +21 -0
  133. data/data/rushcheck/rdoc/classes/TheStdGen.src/M000072.html +18 -0
  134. data/data/rushcheck/rdoc/classes/TrueClass.html +15 -15
  135. data/data/rushcheck/rdoc/classes/TrueClass.src/M000079.html +18 -0
  136. data/data/rushcheck/rdoc/classes/TrueClass.src/M000080.html +18 -0
  137. data/data/rushcheck/rdoc/classes/TrueClass.src/M000081.html +18 -0
  138. data/data/rushcheck/rdoc/created.rid +1 -1
  139. data/data/rushcheck/rdoc/files/rushcheck/config_rb.html +8 -1
  140. data/data/rushcheck/rdoc/files/rushcheck/testable_rb.html +3 -1
  141. data/data/rushcheck/rdoc/files/rushcheck/testoptions_rb.html +109 -0
  142. data/data/rushcheck/rdoc/files/rushcheck/testresult_rb.html +105 -0
  143. data/data/rushcheck/rdoc/files/rushcheck_rb.html +127 -0
  144. data/data/rushcheck/rdoc/fr_class_index.html +5 -0
  145. data/data/rushcheck/rdoc/fr_file_index.html +3 -1
  146. data/data/rushcheck/rdoc/fr_method_index.html +103 -94
  147. data/lib/rushcheck/arbitrary.rb +16 -12
  148. data/lib/rushcheck/array.rb +7 -6
  149. data/lib/rushcheck/assertion.rb +53 -50
  150. data/lib/rushcheck/bool.rb +26 -24
  151. data/lib/rushcheck/config.rb +131 -81
  152. data/lib/rushcheck/float.rb +4 -4
  153. data/lib/rushcheck/gen.rb +194 -182
  154. data/lib/rushcheck/guard.rb +9 -10
  155. data/lib/rushcheck/hash.rb +4 -3
  156. data/lib/rushcheck/integer.rb +11 -6
  157. data/lib/rushcheck/proc.rb +7 -7
  158. data/lib/rushcheck/property.rb +19 -15
  159. data/lib/rushcheck/random.rb +162 -159
  160. data/lib/rushcheck/result.rb +16 -12
  161. data/lib/rushcheck/string.rb +12 -12
  162. data/lib/rushcheck/testable.rb +99 -25
  163. data/lib/rushcheck/testoptions.rb +20 -0
  164. data/lib/rushcheck/testresult.rb +25 -0
  165. data/lib/{rushcheck/rushcheck.rb → rushcheck.rb} +2 -1
  166. metadata +93 -4
  167. data/data/rushcheck/doc/rushcheck.txt +0 -670
@@ -7,25 +7,27 @@ require 'rushcheck/random'
7
7
  require 'rushcheck/result'
8
8
  require 'rushcheck/testable'
9
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]
10
+ module RushCheck
11
+ module RandomBool
12
+ def arbitrary
13
+ RushCheck::Gen.elements([true, false])
14
+ end
15
+
16
+ def random_range(gen, lo=@@min_bound, hi=@@max_bound)
17
+ v, g = Integer.random_range(gen, 0, 1)
18
+ [v==0, g]
19
+ end
18
20
  end
19
21
  end
20
22
 
21
23
  class TrueClass
22
24
 
23
- extend Arbitrary
24
- extend HsRandom
25
- extend RandomBool
25
+ extend RushCheck::Arbitrary
26
+ extend RushCheck::HsRandom
27
+ extend RushCheck::RandomBool
26
28
 
27
- include Testable
28
- include Coarbitrary
29
+ include RushCheck::Testable
30
+ include RushCheck::Coarbitrary
29
31
 
30
32
  @@min_bound = 0
31
33
  @@max_bound = 1
@@ -39,19 +41,19 @@ class TrueClass
39
41
  end
40
42
 
41
43
  def property
42
- Result.new(self).result
44
+ RushCheck::Result.new(self).result
43
45
  end
44
46
 
45
47
  end
46
48
 
47
49
  class FalseClass
48
50
 
49
- extend Arbitrary
50
- extend HsRandom
51
- extend RandomBool
51
+ extend RushCheck::Arbitrary
52
+ extend RushCheck::HsRandom
53
+ extend RushCheck::RandomBool
52
54
 
53
- include Coarbitrary
54
- include Testable
55
+ include RushCheck::Coarbitrary
56
+ include RushCheck::Testable
55
57
 
56
58
  @@min_bound = 0
57
59
  @@max_bound = 1
@@ -65,15 +67,15 @@ class FalseClass
65
67
  end
66
68
 
67
69
  def property
68
- Result.new(self).result
70
+ RushCheck::Result.new(self).result
69
71
  end
70
72
  end
71
73
 
72
74
  class NilClass
73
- extend Arbitrary
75
+ extend RushCheck::Arbitrary
74
76
 
75
- include Coarbitrary
76
- include Testable
77
+ include RushCheck::Coarbitrary
78
+ include RushCheck::Testable
77
79
 
78
80
  def self.arbitrary
79
81
  Gen.unit(nil)
@@ -84,7 +86,7 @@ class NilClass
84
86
  end
85
87
 
86
88
  def property
87
- Result.nothing
89
+ RushCheck::Result.nothing
88
90
  end
89
91
 
90
92
  end
@@ -1,98 +1,148 @@
1
1
  # = Config.rb
2
- # This file is implemented for the class RushCheckConfig.
2
+ # This file is implemented for the class Config.
3
3
 
4
- # RushCheckConfig is a class which has configurations of tests.
5
- # This class is needed for several test functions.
6
- class RushCheckConfig
4
+ require 'rushcheck/testresult'
7
5
 
8
- attr_reader :max_test, :max_fail, :size, :every
6
+ module RushCheck
9
7
 
10
- def self.quick
11
- new(100, 1000,
12
- Proc.new{|x| x / 2 + 3},
13
- Proc.new do |n, args|
14
- s = n.to_s
15
- s + ("\b" * s.length)
16
- end)
17
- end
8
+ # Config is a class which has configurations of tests.
9
+ # This class is needed for several test functions.
10
+ class Config
18
11
 
19
- def self.verbose
20
- new(100, 1000,
21
- Proc.new{|x| x / 2 + 3},
22
- Proc.new do |n, args|
23
- n.to_s + ":\n" + args.join("\n") + "\n"
24
- end)
25
- end
12
+ attr_reader :max_test, :max_fail, :size, :every
26
13
 
27
- def initialize(max_test, max_fail, size, every)
28
- @max_test, @max_fail, @size, @every = max_test, max_fail, size, every
29
- end
14
+ def self.quick
15
+ new(100, 1000,
16
+ Proc.new{|x| x / 2 + 3},
17
+ Proc.new do |n, args|
18
+ s = n.to_s
19
+ s + ("\b" * s.length)
20
+ end)
21
+ end
30
22
 
31
- # print results of tests.
32
- def done(mesg, ntest, stamps)
33
- print mesg + ' ' + ntest.to_s + ' tests'
34
-
35
- bag = stamps.compact.find_all {|x| ! x.empty?}.sort.
36
- inject(Hash.new) do |r, m|
37
- r[m] = r[m].nil? ? 1 : r[m] + 1
38
- r
39
- end.sort_by {|k, v| v}.reverse.map do |pair|
40
- percentage = ((100 * pair[1]) / ntest).to_s + '%'
41
- ([percentage] + pair[0]).join(', ')
42
- end
23
+ def self.verbose
24
+ new(100, 1000,
25
+ Proc.new{|x| x / 2 + 3},
26
+ Proc.new do |n, args|
27
+ n.to_s + ":\n" + args.join("\n") + "\n"
28
+ end)
29
+ end
43
30
 
44
- mes = case bag.length
45
- when 0
46
- ".\n"
47
- when 1
48
- '(' + bag[0] + ").\n"
49
- else
50
- ".\n" + bag.join(".\n") + ".\n"
51
- end
31
+ def self.batch(n, v)
32
+ new(n, n * 10,
33
+ Proc.new{|x| (x / 2 + 3).to_i},
34
+ Proc.new do |n, args|
35
+ v ? n.to_s + ":\n" + args.join("\n") + "\n" : ""
36
+ end)
37
+ end
52
38
 
53
- print mes
54
- end
39
+ def initialize(max_test, max_fail, size, every)
40
+ @max_test, @max_fail, @size, @every = max_test, max_fail, size, every
41
+ end
55
42
 
56
- # execute tests
57
- def tests(gen, rnd, nt=1, nf=0, stamps=[])
58
- ntest, nfail = nt, nf
59
- while true
60
- if ntest > max_test
61
- done('OK, passed', max_test, stamps)
62
- tests_result = true
63
- break
64
- end
65
- if nfail > max_fail
66
- done('Arguments exhausted after ', ntest, stamps)
67
- tests_result = nil
68
- break
43
+ # print results of tests.
44
+ def done(mesg, ntest, stamps)
45
+ print mesg + ' ' + ntest.to_s + ' tests'
46
+
47
+ bag = stamps.compact.find_all {|x| ! x.empty?}.sort.
48
+ inject(Hash.new) do |r, m|
49
+ r[m] = r[m].nil? ? 1 : r[m] + 1
50
+ r
51
+ end.sort_by {|k, v| v}.reverse.map do |pair|
52
+ percentage = ((100 * pair[1]) / ntest).to_s + '%'
53
+ ([percentage] + pair[0]).join(', ')
69
54
  end
70
55
 
71
- rnd_l, rnd_r = rnd.split
72
- result = gen.generate(size.call(ntest), rnd_r)
73
- message = every.call(ntest, result.arguments)
74
- print message # don't puts
75
-
76
- case result.ok
77
- when nil
78
- nfail += 1
79
- redo
80
- when true
81
- stamps.push(result.stamp)
82
- ntest += 1
83
- redo
84
- when false
85
- error = "Falsifiable, after " + ntest.to_s + " tests:\n" +
86
- result.arguments.join("\n")
87
- puts error
88
- tests_result = false
89
- break
90
- else
91
- raise(RuntimeError, "RushCheck: illegal result")
56
+ mes = case bag.length
57
+ when 0
58
+ ".\n"
59
+ when 1
60
+ '(' + bag[0] + ").\n"
61
+ else
62
+ ".\n" + bag.join(".\n") + ".\n"
63
+ end
64
+
65
+ print mes
66
+ end
67
+
68
+ # execute tests
69
+ def tests(gen, rnd, nt=1, nf=0, stamps=[])
70
+ ntest, nfail = nt, nf
71
+ while true
72
+ if ntest > max_test
73
+ done('OK, passed', max_test, stamps)
74
+ tests_result = true
75
+ break
76
+ end
77
+ if nfail > max_fail
78
+ done('Arguments exhausted after ', ntest, stamps)
79
+ tests_result = nil
80
+ break
81
+ end
82
+
83
+ rnd_l, rnd_r = rnd.split
84
+ result = gen.generate(size.call(ntest), rnd_r)
85
+ message = every.call(ntest, result.arguments)
86
+ print message # don't puts
87
+
88
+ case result.ok
89
+ when nil
90
+ nfail += 1
91
+ redo
92
+ when true
93
+ stamps.push(result.stamp)
94
+ ntest += 1
95
+ redo
96
+ when false
97
+ error = "Falsifiable, after " + ntest.to_s + " tests:\n" +
98
+ result.arguments.join("\n")
99
+ puts error
100
+ tests_result = false
101
+ break
102
+ else
103
+ raise(RuntimeError, "RushCheck: illegal result")
104
+ end
92
105
  end
106
+
107
+ tests_result
93
108
  end
94
-
95
- tests_result
109
+
110
+ def test_batch(gen, rnd, nt=1, nf=0, stamps=[])
111
+ ntest, nfail = nt, nf
112
+ while true
113
+ if ntest > max_test
114
+ tests_result = RushCheck::TestOk.new("OK, passed", ntest, stamps)
115
+ break
116
+ end
117
+ if nfail > max_fail
118
+ test_result = RushCheck::TestExausted.new('Arguments exhausted after ', ntest, stamps)
119
+ break
120
+ end
121
+
122
+ rnd_l, rnd_r = rnd.split
123
+ result = gen.generate(size.call(ntest), rnd_r)
124
+ message = every.call(ntest, result.arguments)
125
+ print message # don't puts
126
+
127
+ case result.ok
128
+ when nil
129
+ nfail += 1
130
+ redo
131
+ when true
132
+ stamps.push(result.stamp)
133
+ ntest += 1
134
+ redo
135
+ when false
136
+ tests_result = RushCheck::TestFailed.new(result.arguments, ntest)
137
+ break
138
+ else
139
+ raise(RuntimeError, "RushCheck: illegal result")
140
+ end
141
+ end
142
+
143
+ test_result
144
+ end
145
+
96
146
  end
97
147
 
98
148
  end
@@ -7,16 +7,16 @@ require 'rushcheck/random'
7
7
 
8
8
  class Float
9
9
 
10
- extend Arbitrary
11
- extend HsRandom
10
+ extend RushCheck::Arbitrary
11
+ extend RushCheck::HsRandom
12
12
 
13
- include Coarbitrary
13
+ include RushCheck::Coarbitrary
14
14
 
15
15
  @@min_bound = 0.0
16
16
  @@max_bound = 1.0
17
17
 
18
18
  def self.arbitrary
19
- Gen.new do |n, r|
19
+ RushCheck::Gen.new do |n, r|
20
20
  a, b, c = (1..3).map { Integer.arbitrary.value(n, r) }
21
21
  a + (b / (c.abs + 1))
22
22
  end