HomePhabricator

[source maps] Fix remove, insert-after and replace

Authored by Walter Erquinigo <waltermelon@fb.com> on Apr 3 2020, 5:29 PM.

Description

[source maps] Fix remove, insert-after and replace

Summary:
In this diff of mine D77186 I introduce a bug in the replace operation, where I was failing fast by mistake.
Besides, a similar problem existed in the insert-after operation, where it was failing fast.

Finally, the remove operation was wrong, as it was not using the indices provided by the users.

I fixed those issues and added some tests account for cases with multiple elements in these requests.

Reviewers: labath, clayborg

Reviewed By: labath

Subscribers: mgrang, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D77324

Event Timeline

Walter Erquinigo <wallace@fb.com> committed rGca47ac3d5f6f: [source maps] Fix remove, insert-after and replace (authored by Walter Erquinigo <waltermelon@fb.com>).Apr 3 2020, 7:15 PM