Open xyn22 opened 1 year ago
closes #1016 closes #1004
rawIndex
this.tail should point to the last added value as it has rawIndex as previous tail + 1
this.tail
this.tail points to the previous tail.
If currentNode is the tail then newNode should be the new tail, as in this scenario currentNode will have newNode as its next
currentNode
newNode
tail
next
closes #1016 closes #1004
To reproduce
rawIndex
equals to last node index + 1 (exactly where new node would fit)Expectation
this.tail
should point to the last added value as it has rawIndex as previous tail + 1Behaviour
this.tail
points to the previous tail.Fix
If
currentNode
is the tail thennewNode
should be the newtail
, as in this scenariocurrentNode
will havenewNode
as itsnext