summaryrefslogtreecommitdiff
path: root/tests/csgtestcore.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-07-01 00:08:45 (GMT)
committerMarius Kintel <marius@kintel.net>2012-07-01 00:08:45 (GMT)
commit54067c635d1a6de4509930ed9d8593f5373f2ba1 (patch)
tree5f5a8cd6989a30dd021bcca99a56ed0c0587a0c2 /tests/csgtestcore.cc
parent431a24b4973069c86728f28efa62930354f92f6d (diff)
Fixed normalization bug: node limit wasn't checked properly and some cases triggered exponential expansion of nodes during normalization. Fixes #127
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r--tests/csgtestcore.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc
index 02cf73c..acc7c31 100644
--- a/tests/csgtestcore.cc
+++ b/tests/csgtestcore.cc
@@ -302,8 +302,8 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
}
// CSG normalization
- CSGTermNormalizer normalizer;
- csgInfo.root_norm_term = normalizer.normalize(root_raw_term, 5000);
+ CSGTermNormalizer normalizer(5000);
+ csgInfo.root_norm_term = normalizer.normalize(root_raw_term);
if (csgInfo.root_norm_term) {
csgInfo.root_chain = new CSGChain();
csgInfo.root_chain->import(csgInfo.root_norm_term);
@@ -319,7 +319,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
csgInfo.highlights_chain = new CSGChain();
for (unsigned int i = 0; i < csgInfo.highlight_terms.size(); i++) {
- csgInfo.highlight_terms[i] = normalizer.normalize(csgInfo.highlight_terms[i], 5000);
+ csgInfo.highlight_terms[i] = normalizer.normalize(csgInfo.highlight_terms[i]);
csgInfo.highlights_chain->import(csgInfo.highlight_terms[i]);
}
}
@@ -329,7 +329,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
csgInfo.background_chain = new CSGChain();
for (unsigned int i = 0; i < csgInfo.background_terms.size(); i++) {
- csgInfo.background_terms[i] = normalizer.normalize(csgInfo.background_terms[i], 5000);
+ csgInfo.background_terms[i] = normalizer.normalize(csgInfo.background_terms[i]);
csgInfo.background_chain->import(csgInfo.background_terms[i]);
}
}
contact: Jan Huwald // Impressum