Skip to content

Commit

Permalink
Test case to reproduce a postcondition violation in {DS_HASH_TABLE}.s…
Browse files Browse the repository at this point in the history
…earch

After setting the key equality tester of a DS_HASH_TABLE, a call to `search'
will throw a postcondition violation:
found_set: found = has (k)

When digging a but futher, I can see that the postcondition of
{DS_SPARSE_CONTAINER}.search_position is also violated:
slots_position_set: slots_position = hash_position (k)

However, I don't know how to fix this bug...
  • Loading branch information
Olivier Ligot committed May 3, 2013
1 parent a370b1f commit ca7b465
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/structure/ds_test_hash_table.e
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ feature -- Test
a_table1.force_last (1, "one")
a_table1.force_last (2, "two")
assert ("not_has_void", not a_table1.has_void)
a_table1.search ("one")
end

feature {NONE} -- Implementation
Expand Down

0 comments on commit ca7b465

Please sign in to comment.