mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-30 04:40:34 +00:00
Improve buffer test
This commit is contained in:
parent
c51f84955e
commit
56f5b475eb
1 changed files with 5 additions and 2 deletions
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue