MCPcopy
hub / github.com/syncthing/syncthing / TestCopy

Function TestCopy

lib/protocol/vector_test.go:72–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestCopy(t *testing.T) {
73 v0 := Vector{Counters: []Counter{{ID: 42, Value: 1}}}
74 v1 := v0.Copy()
75 v1.Update(42)
76 if v0.Compare(v1) != Lesser {
77 t.Errorf("Copy error, %+v should be ancestor of %+v", v0, v1)
78 }
79}
80
81func TestMerge(t *testing.T) {
82 testcases := []struct {

Callers

nothing calls this directly

Calls 3

CopyMethod · 0.95
CompareMethod · 0.95
UpdateMethod · 0.65

Tested by

no test coverage detected