Remove redundant tests for the same random edit operations
This commit is contained in:
parent
2bcd2e4d00
commit
f9e6fce62d
1 changed files with 1 additions and 21 deletions
|
|
@ -144,7 +144,7 @@ describe("Languages", [&]() {
|
|||
std::set<std::pair<size_t, size_t>> deletions;
|
||||
std::set<std::pair<size_t, string>> insertions;
|
||||
|
||||
for (size_t i = 0; i < 50; i++) {
|
||||
for (size_t i = 0; i < 80; i++) {
|
||||
size_t edit_position = random() % SpyInput::char_count(entry.input);
|
||||
size_t deletion_size = random() % (SpyInput::char_count(entry.input) - edit_position);
|
||||
string inserted_text = random_words(random() % 4 + 1);
|
||||
|
|
@ -159,16 +159,6 @@ describe("Languages", [&]() {
|
|||
ts_document_edit(doc, input->undo());
|
||||
ts_document_parse(doc);
|
||||
});
|
||||
|
||||
it_handles_edit_sequence("performing and repairing an insertion of " + description, [&]() {
|
||||
ts_document_parse(doc);
|
||||
|
||||
ts_document_edit(doc, input->replace(edit_position, 0, inserted_text));
|
||||
ts_document_parse(doc);
|
||||
|
||||
ts_document_edit(doc, input->undo());
|
||||
ts_document_parse(doc);
|
||||
});
|
||||
}
|
||||
|
||||
if (deletions.insert({edit_position, deletion_size}).second) {
|
||||
|
|
@ -181,16 +171,6 @@ describe("Languages", [&]() {
|
|||
ts_document_edit(doc, input->undo());
|
||||
ts_document_parse(doc);
|
||||
});
|
||||
|
||||
it_handles_edit_sequence("performing and repairing a deletion of " + desription, [&]() {
|
||||
ts_document_parse(doc);
|
||||
|
||||
ts_document_edit(doc, input->replace(edit_position, deletion_size, ""));
|
||||
ts_document_parse(doc);
|
||||
|
||||
ts_document_edit(doc, input->undo());
|
||||
ts_document_parse(doc);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue