MCPcopy Create free account
hub / github.com/bufbuild/buf / TestOptions

Function TestOptions

private/bufpkg/bufimage/bufimageutil/bufimageutil_test.go:217–257  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

215}
216
217func TestOptions(t *testing.T) {
218 t.Parallel()
219 t.Run("include_option", func(t *testing.T) {
220 t.Parallel()
221 runDiffTest(t, "testdata/options", "options.foo.include.txtar", WithIncludeTypes(
222 "message_foo",
223 "field_foo",
224 "oneof_foo",
225 "enum_foo",
226 "enum_value_foo",
227 "service_foo",
228 "method_foo",
229 "UsedOption.file_foo",
230 ))
231 })
232 t.Run("exclude_foo", func(t *testing.T) {
233 t.Parallel()
234 runDiffTest(t, "testdata/options", "options.foo.exclude.txtar", WithExcludeTypes(
235 "message_foo",
236 "field_foo",
237 "oneof_foo",
238 "enum_foo",
239 "enum_value_foo",
240 "service_foo",
241 "method_foo",
242 "UsedOption.file_foo",
243 ))
244 })
245 t.Run("only_file", func(t *testing.T) {
246 t.Parallel()
247 runDiffTest(t, "testdata/options", "options.only_file.txtar", WithExcludeTypes(
248 "message_foo", "message_bar", "message_baz",
249 "field_foo", "field_bar", "field_baz",
250 "oneof_foo", "oneof_bar", "oneof_baz",
251 "enum_foo", "enum_bar", "enum_baz",
252 "enum_value_foo", "enum_value_bar", "enum_value_baz",
253 "service_foo", "service_bar", "service_baz",
254 "method_foo", "method_bar", "method_baz",
255 ))
256 })
257}
258
259func TestOptionImports(t *testing.T) {
260 t.Parallel()

Callers

nothing calls this directly

Calls 4

runDiffTestFunction · 0.85
WithIncludeTypesFunction · 0.85
WithExcludeTypesFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…