ocg 1.1.0 → 1.1.1
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/README.md +21 -22
- data/lib/ocg/operator/mix.rb +1 -1
- data/lib/ocg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e83ab5f4d11bb896232eec11899760bad56e796defdd58cdb85c924bdd76b1f7
|
4
|
+
data.tar.gz: 589806f0286556ef6f821e6f75041bf4b08732f09d6428f7fb1c36f8f47234c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc0a06788380a7c01e893456f9878ac753c557f4b378ea5b77399010fd3e132056cc39fce6a9b18f647e04c0f621b6b43bd3686ddf8bd623badf59008b8eed8c
|
7
|
+
data.tar.gz: bac8c658e3682d2ddf4d18ed7aaa7a175c23065fc63f4871d582150f9f4c48964c749b4b6b1531a923929a361443a6b66100ff37234e80159b164d875a2774ce
|
data/README.md
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
# Option combination generator
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
[](https://cirrus-ci.com/github/andrew-aladev/ocg)
|
6
|
-
[](https://circleci.com/gh/andrew-aladev/ocg/tree/master)
|
3
|
+
| Travis | AppVeyor | Cirrus | Circle |
|
4
|
+
| :---: | :---: | :---: | :---: |
|
5
|
+
| [](https://travis-ci.com/andrew-aladev/ocg) | [](https://ci.appveyor.com/project/andrew-aladev/ocg/branch/master) | [](https://cirrus-ci.com/github/andrew-aladev/ocg) | [](https://circleci.com/gh/andrew-aladev/ocg/tree/master) |
|
7
6
|
|
8
7
|
## Installation
|
9
8
|
|
@@ -40,9 +39,7 @@ generator = OCG.new(
|
|
40
39
|
:h => 7..8
|
41
40
|
)
|
42
41
|
|
43
|
-
until generator.finished?
|
44
|
-
puts generator.next
|
45
|
-
end
|
42
|
+
puts generator.next until generator.finished?
|
46
43
|
```
|
47
44
|
|
48
45
|
It will populate all option combinations.
|
@@ -91,6 +88,7 @@ You can combine generators using `and`, `mix` and `or`.
|
|
91
88
|
Many software uses multiple options and have complex relations between them.
|
92
89
|
We want to test this software.
|
93
90
|
We need to provide optimal option combination to maximize test coverage.
|
91
|
+
The amount of combinations can be more than billion, it is not possible to store them (fuzzing testing).
|
94
92
|
|
95
93
|
Let's look at [zstd compressor options](http://facebook.github.io/zstd/zstd_manual.html#Chapter5).
|
96
94
|
|
@@ -104,7 +102,7 @@ general_generator = OCG.new(
|
|
104
102
|
)
|
105
103
|
.or(
|
106
104
|
:windowLog => 0..10,
|
107
|
-
:hashLog
|
105
|
+
:hashLog => 0..10,
|
108
106
|
...
|
109
107
|
)
|
110
108
|
```
|
@@ -118,8 +116,8 @@ ldm_generator = OCG.new(
|
|
118
116
|
)
|
119
117
|
.or(
|
120
118
|
:enableLongDistanceMatching => [true],
|
121
|
-
:ldmHashLog
|
122
|
-
:ldmMinMatch
|
119
|
+
:ldmHashLog => 0..10,
|
120
|
+
:ldmMinMatch => 0..10,
|
123
121
|
...
|
124
122
|
)
|
125
123
|
```
|
@@ -132,29 +130,30 @@ main_generator = general_generator.and ldm_generator
|
|
132
130
|
```
|
133
131
|
|
134
132
|
`contentSizeFlag`, `checksumFlag`, `dictIDFlag` options are additional options.
|
135
|
-
These options
|
136
|
-
We want just to mix their values with main options.
|
133
|
+
These options may correlate between each other but don't correlate with main options.
|
137
134
|
|
138
135
|
```ruby
|
139
136
|
almost_complete_generator = main_generator.mix(
|
140
|
-
:contentSizeFlag => [true, false]
|
141
|
-
|
142
|
-
|
143
|
-
:checksumFlag => [true, false]
|
144
|
-
)
|
145
|
-
.mix(
|
146
|
-
:dictIDFlag => [true, false]
|
137
|
+
:contentSizeFlag => [true, false],
|
138
|
+
:checksumFlag => [true, false],
|
139
|
+
:dictIDFlag => [true, false]
|
147
140
|
)
|
148
141
|
```
|
149
142
|
|
150
143
|
`nbWorkers`, `jobSize` and `overlapLog` options are thread related options.
|
144
|
+
When `nbWorkers` equals `0`, `jobSize` and `overlapLog` should not be used.
|
151
145
|
These options correlate between each other but don't correlate with main options.
|
152
146
|
|
153
147
|
```ruby
|
154
148
|
complete_generator = almost_complete_generator.mix(
|
155
|
-
|
156
|
-
|
157
|
-
|
149
|
+
OCG.new(
|
150
|
+
:nbWorkers => [0]
|
151
|
+
)
|
152
|
+
.or(
|
153
|
+
:nbWorkers => 1..2,
|
154
|
+
:jobSize => 1..10,
|
155
|
+
:overlapLog => 0..9
|
156
|
+
)
|
158
157
|
)
|
159
158
|
```
|
160
159
|
|
data/lib/ocg/operator/mix.rb
CHANGED
data/lib/ocg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Aladjev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|