rubycheck 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubycheck.rb +16 -3
- data/lib/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be78b6ef57cf6df5b0d9d426b15fcb3d2e435ee
|
4
|
+
data.tar.gz: 99230318ca6b801618ed5a868a0f6d0d8b0d578b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf3f8827390575db2b7f5c3b458702ac46797be805c6e6cfee427cd9656cb95b41b88478a0edef3034ffa019c428903f89b7e3ac2459fa2b1480d883a205ff9f
|
7
|
+
data.tar.gz: be63c4059cb9214a655bc3697d345dc578e4fca301321cfd1e3725d9968e6b628d113760e4700d242a3b6509f2cf23f42ae3861db123842478e395a36208f54e
|
data/lib/rubycheck.rb
CHANGED
@@ -12,7 +12,20 @@ include Contracts
|
|
12
12
|
# and encourages monkeypatching for defining generators for custom types.
|
13
13
|
#
|
14
14
|
module RubyCheck
|
15
|
-
Contract nil =>
|
15
|
+
Contract nil => Float
|
16
|
+
#
|
17
|
+
# Generate a random float in [0, 10^10 - 1].
|
18
|
+
#
|
19
|
+
# Example:
|
20
|
+
#
|
21
|
+
# RubyCheck::gen_float
|
22
|
+
# => 0.223
|
23
|
+
#
|
24
|
+
def self.gen_float
|
25
|
+
Random.rand(10e10)
|
26
|
+
end
|
27
|
+
|
28
|
+
Contract nil => Integer
|
16
29
|
#
|
17
30
|
# Generate a random integer in [0, 10^10 - 1].
|
18
31
|
#
|
@@ -25,7 +38,7 @@ module RubyCheck
|
|
25
38
|
Random.rand(10e10).to_i
|
26
39
|
end
|
27
40
|
|
28
|
-
Contract nil =>
|
41
|
+
Contract nil => Integer
|
29
42
|
#
|
30
43
|
# Generate a random byte in [0, 255].
|
31
44
|
#
|
@@ -38,7 +51,7 @@ module RubyCheck
|
|
38
51
|
gen_int % 256
|
39
52
|
end
|
40
53
|
|
41
|
-
Contract nil =>
|
54
|
+
Contract nil => Integer
|
42
55
|
#
|
43
56
|
# Generate a random ASCII character.
|
44
57
|
#
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubycheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Pennebaker
|
@@ -249,8 +249,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
251
|
rubyforge_project:
|
252
|
-
rubygems_version: 2.
|
252
|
+
rubygems_version: 2.1.10
|
253
253
|
signing_key:
|
254
254
|
specification_version: 4
|
255
255
|
summary: a Ruby port of the QuickCheck unit test framework
|
256
256
|
test_files: []
|
257
|
+
has_rdoc:
|