scala/scala — pull request #1126 by rklaehn (2012-08-12 21:09:53+00:00)
Title: Improve efficiency of updated

Added utility method to create a HashTrieSet with two leaf HashSets with different hash
Used said utility method instead of creating a temorary HashTrieSet with an empty elems array
Added assertions to HashTrieSet to validate tree

It is difficult to write a test for this, because the old behavior was not wrong, just inefficient. A good test of the HashTrieSet in general would be to run the test suite with both assertions enabled. But the assertion that tests that elems.length must be >1 unless the child element is a HashTrieSet itself must remain commented out until SI-6197 is implemented.