(t *testing.T)
| 1881 | } |
| 1882 | |
| 1883 | func 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 | } |
nothing calls this directly
no test coverage detected