MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / TestRevTreeCompareRevIDs

Function TestRevTreeCompareRevIDs

db/revtree_test.go:373–380  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

371}
372
373func TestRevTreeCompareRevIDs(t *testing.T) {
374 ctx := base.TestCtx(t)
375 assert.Equal(t, 0, compareRevIDs(ctx, "1-aaa", "1-aaa"))
376 assert.Equal(t, -1, compareRevIDs(ctx, "1-aaa", "5-aaa"))
377 assert.Equal(t, 1, compareRevIDs(ctx, "10-aaa", "5-aaa"))
378 assert.Equal(t, 1, compareRevIDs(ctx, "1-bbb", "1-aaa"))
379 assert.Equal(t, 1, compareRevIDs(ctx, "5-bbb", "1-zzz"))
380}
381
382// TestRevTreeChannelMapLeafOnly ensures that only non-winning leaf revisions populate channel information from/to channelMap.
383func TestRevTreeChannelMapLeafOnly(t *testing.T) {

Callers

nothing calls this directly

Calls 3

TestCtxFunction · 0.92
compareRevIDsFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected