haleyhousellc / arboriculture

A simple tree library written in TypeScript.
https://haleyhousellc.github.io/arboriculture
ISC License
2 stars 0 forks source link

Serious issue when inserting a duplicate (an update operation) #22

Closed haleyga closed 6 years ago

haleyga commented 6 years ago

When a key is inserted that already exists in the tree, the behavior is to treat the insertion as an update.

Currently, tests certify that this works properly, but clearly the tests are inadequate. There is a serious issue when updating a key wherein the integrity of the tree is ruined. That's bad.

haleyga commented 6 years ago

New failing tests added. Working on the fix now.

haleyga commented 6 years ago

Looks like this may bleed into #remove. I clearly cocked something up.