(t *testing.T)
| 348 | } |
| 349 | |
| 350 | func TestApplyOutOfOrder(t *testing.T) { |
| 351 | st := New() |
| 352 | defer close(st.Ops) |
| 353 | st.Ops <- Op{2, MustEncodeSet("/x", "b", Clobber)} |
| 354 | st.Ops <- Op{1, MustEncodeSet("/x", "a", Clobber)} |
| 355 | |
| 356 | sync(st, 2) |
| 357 | v, rev := st.Get("/x") |
| 358 | assert.Equal(t, int64(2), rev) |
| 359 | assert.Equal(t, []string{"b"}, v) |
| 360 | } |
| 361 | |
| 362 | func TestApplyIgnoreDuplicate(t *testing.T) { |
| 363 | st := New() |
nothing calls this directly
no test coverage detected