fix move-range tests of moved-moved items
This commit is contained in:
@@ -563,10 +563,10 @@ const arrayTransactions = [
|
||||
return
|
||||
}
|
||||
const pos = prng.int32(gen, 0, yarray.length - 1)
|
||||
const len = prng.int32(gen, 1, math.min(1, yarray.length - pos))
|
||||
const len = prng.int32(gen, 1, math.min(3, yarray.length - pos))
|
||||
const _newPosAdj = prng.int32(gen, 0, yarray.length - len)
|
||||
// make sure that we don't insert in-between the moved range
|
||||
const newPos = _newPosAdj + (_newPosAdj > yarray.length - len ? len : 0)
|
||||
const newPos = _newPosAdj + (_newPosAdj > pos ? len : 0)
|
||||
const oldContent = yarray.toArray()
|
||||
yarray.moveRange(pos, pos + len - 1, newPos)
|
||||
const movedValues = oldContent.splice(pos, len)
|
||||
|
||||
Reference in New Issue
Block a user