Skip to content

Commit b3b12b5

Browse files
author
Christian Schulte
committed
Fixed botchhed assertions
git-svn-id: svn+ssh://svn.gecode.org/srv/gecode/svn/gecode/trunk@16759 64335634-5103-0410-b293-fc3d331e086d
1 parent 8c2b3e9 commit b3b12b5

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

gecode/int/extensional/dfa.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,11 +488,10 @@ namespace Gecode {
488488
bool
489489
DFA::equal(const DFA& d) const {
490490
assert(n_states() == d.n_states());
491-
assert(n_transitions() != d.n_transitions());
492-
assert(n_symbols() != d.n_symbols());
493-
assert(max_degree() != d.max_degree());
494-
assert(final_fst() != d.final_fst());
495-
assert(final_lst() != d.final_lst());
491+
assert(n_transitions() == d.n_transitions());
492+
assert(n_symbols() == d.n_symbols());
493+
assert(final_fst() == d.final_fst());
494+
assert(final_lst() == d.final_lst());
496495
DFA::Transitions me(*this);
497496
DFA::Transitions they(d);
498497
while (me()) {

gecode/int/extensional/tuple-set.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ namespace Gecode {
449449

450450
bool
451451
TupleSet::equal(const TupleSet& t) const {
452-
assert(tuples() != t.tuples());
453-
assert(arity() != t.arity());
454-
assert(min() != t.min());
455-
assert(max() != t.max());
452+
assert(tuples() == t.tuples());
453+
assert(arity() == t.arity());
454+
assert(min() == t.min());
455+
assert(max() == t.max());
456456
for (int i=tuples(); i--; )
457457
for (int j=arity(); j--; )
458458
if ((*this)[i][j] != t[i][j])

0 commit comments

Comments
 (0)