(t *testing.T)
| 360 | } |
| 361 | |
| 362 | func TestApplyIgnoreDuplicate(t *testing.T) { |
| 363 | st := New() |
| 364 | defer close(st.Ops) |
| 365 | st.Ops <- Op{1, MustEncodeSet("/x", "a", Clobber)} |
| 366 | st.Ops <- Op{1, MustEncodeSet("/x", "b", Clobber)} |
| 367 | sync(st, 1) |
| 368 | v, rev := st.Get("/x") |
| 369 | assert.Equal(t, int64(1), rev) |
| 370 | assert.Equal(t, []string{"a"}, v) |
| 371 | |
| 372 | // check that we aren't leaking memory |
| 373 | assert.Equal(t, 0, st.todo.Len()) |
| 374 | } |
| 375 | |
| 376 | func TestApplyIgnoreDuplicateOutOfOrder(t *testing.T) { |
| 377 | st := New() |
nothing calls this directly
no test coverage detected