Improve buffer test

This commit is contained in:
Zachary Yedidia
2020-02-25 23:21:50 -05:00
parent c51f84955e
commit 56f5b475eb

View File

@@ -85,7 +85,9 @@ func check(t *testing.T, before []string, operations []operation, after []string
checkText(after)
for b.UndoStack.Peek() != nil {
// must have exactly two events per operation (delete and insert)
for range operations {
b.UndoOneEvent()
b.UndoOneEvent()
}
@@ -101,7 +103,8 @@ func check(t *testing.T, before []string, operations []operation, after []string
}
}
for b.RedoStack.Peek() != nil {
for range operations {
b.RedoOneEvent()
b.RedoOneEvent()
}