dither 0.2.1 → 0.2.2
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/ext/dither/ipog.cc +37 -36
- data/lib/dither/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b2f3f8fa861ae290b01ece8edf0150480d7b3cf
|
4
|
+
data.tar.gz: 3c00e98cf8b3b8a80b4327f2418068d07e871db5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62e73bc1bf276f26aab2d0115fb6125fb01871695a57823078401a3475a102bffbeb588d3c48552f5094f4a1ec339112053c657329b27f9bac068d4b04400644
|
7
|
+
data.tar.gz: 0154292ff25b831fc39acd29388efb5e0520e7434db8282942ab5f7e1b8bdd00db4215b3a71e2ee83fd1f2f2f07a38b75139b830b745e6af55efc0cc3c4a2a92
|
data/ext/dither/ipog.cc
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
#include <utility>
|
14
14
|
#include <tuple>
|
15
15
|
#include <limits.h>
|
16
|
+
#include <cstddef>
|
16
17
|
|
17
18
|
namespace dither {
|
18
19
|
|
@@ -107,37 +108,41 @@ void Ipog::run() {
|
|
107
108
|
const std::vector<param> &test_case = *pairs;
|
108
109
|
bool case_covered = constraint_handler->violate_constraints(test_case);
|
109
110
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
}
|
135
|
-
if (!constraint_handler->violate_constraints(unbound_test_case)) {
|
136
|
-
unbound_.push_front(unbound_test_case);
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
111
|
+
if(!case_covered) {
|
112
|
+
for (auto it = unbound_.cbegin(); it != unbound_.cend(); ++it) {
|
113
|
+
if(is_covered(*it, test_case)) {
|
114
|
+
case_covered = true;
|
115
|
+
break;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
if (!case_covered) {
|
121
|
+
bool is_merged = false;
|
122
|
+
|
123
|
+
for(auto next = unbound_.begin(); next != unbound_.end(); ++next) {
|
124
|
+
const int merge_result = merge(k, *next, test_case);
|
125
|
+
|
126
|
+
if (merge_result > 0) {
|
127
|
+
dtest_case tmp = *next;
|
128
|
+
for (auto it = test_case.cbegin(); it != test_case.cend(); ++it) {
|
129
|
+
tmp[(*it).first] = (*it).second;
|
130
|
+
}
|
131
|
+
is_merged = true;
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
}
|
140
135
|
|
136
|
+
if (!is_merged) {
|
137
|
+
dtest_case unbound_test_case(param_cache_.size(), -1);
|
138
|
+
for (auto it = test_case.cbegin(); it != test_case.cend(); ++it) {
|
139
|
+
unbound_test_case[(*it).first] = (*it).second;
|
140
|
+
}
|
141
|
+
if (!constraint_handler->violate_constraints(unbound_test_case)) {
|
142
|
+
unbound_.push_front(unbound_test_case);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
141
146
|
}
|
142
147
|
}
|
143
148
|
ground_solutions();
|
@@ -163,12 +168,8 @@ inline const int Ipog::merge(const int k, dtest_case &test_case,
|
|
163
168
|
return -1;
|
164
169
|
}
|
165
170
|
|
166
|
-
for (auto
|
167
|
-
|
168
|
-
}
|
169
|
-
|
170
|
-
for (auto i = 0; i < k; i++) {
|
171
|
-
if (test_case[i] == -1) {
|
171
|
+
for (auto i = 0; i <= k; i++) {
|
172
|
+
if (merge_scratch_[i] == -1) {
|
172
173
|
return 1;
|
173
174
|
}
|
174
175
|
}
|
data/lib/dither/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dither
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Gowan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project: dither
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.2.0
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Collection of test generation strategies
|