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

Function TestIsRevTreeID

base/util_test.go:1883–1907  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1881}
1882
1883func TestIsRevTreeID(t *testing.T) {
1884 tests := []struct {
1885 value string
1886 expected bool
1887 }{
1888 {"1-abc", true},
1889 {"1-abc123", true},
1890 {"1-abc123def456", true},
1891 {"1-abc123def456ghi789", true},
1892 {"1-abc123def456ghi789jkl012", true},
1893 {"123-abc123", true},
1894 {"1234567890-a", true},
1895 {"0-a", true},
1896 {"1", false},
1897 {"abc", false},
1898 {"a-abc", false},
1899 {"-abc", false},
1900 {"1a@bc", false},
1901 }
1902 for _, tt := range tests {
1903 t.Run(tt.value, func(t *testing.T) {
1904 assert.Equalf(t, tt.expected, IsRevTreeID(tt.value), "IsRevTreeID(%v)", tt.value)
1905 })
1906 }
1907}

Callers

nothing calls this directly

Calls 2

IsRevTreeIDFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected