Home / Function/ TestBindingJSONSlice() — gin Function Reference

TestBindingJSONSlice() — gin Function Reference

Architecture documentation for the TestBindingJSONSlice() function in binding_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  c4adba41_21a3_6f62_f233_424513f3dcc7["TestBindingJSONSlice()"]
  314c6481_2bd0_e5a7_282c_94e41df6062a["binding_test.go"]
  c4adba41_21a3_6f62_f233_424513f3dcc7 -->|defined in| 314c6481_2bd0_e5a7_282c_94e41df6062a
  46632c2f_0364_937c_dd28_7467f1128e6e["testBodyBindingSlice()"]
  c4adba41_21a3_6f62_f233_424513f3dcc7 -->|calls| 46632c2f_0364_937c_dd28_7467f1128e6e
  style c4adba41_21a3_6f62_f233_424513f3dcc7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/binding_test.go lines 195–207

func TestBindingJSONSlice(t *testing.T) {
	EnableDecoderDisallowUnknownFields = true
	defer func() {
		EnableDecoderDisallowUnknownFields = false
	}()

	testBodyBindingSlice(t, JSON, "json", "/", "/", `[]`, ``)
	testBodyBindingSlice(t, JSON, "json", "/", "/", `[{"foo": "123"}]`, `[{}]`)
	testBodyBindingSlice(t, JSON, "json", "/", "/", `[{"foo": "123"}]`, `[{"foo": ""}]`)
	testBodyBindingSlice(t, JSON, "json", "/", "/", `[{"foo": "123"}]`, `[{"foo": 123}]`)
	testBodyBindingSlice(t, JSON, "json", "/", "/", `[{"foo": "123"}]`, `[{"bar": 123}]`)
	testBodyBindingSlice(t, JSON, "json", "/", "/", `[{"foo": "123"}]`, `[{"foo": "123456789012345678901234567890123"}]`)
}

Subdomains

Frequently Asked Questions

What does TestBindingJSONSlice() do?
TestBindingJSONSlice() is a function in the gin codebase, defined in binding/binding_test.go.
Where is TestBindingJSONSlice() defined?
TestBindingJSONSlice() is defined in binding/binding_test.go at line 195.
What does TestBindingJSONSlice() call?
TestBindingJSONSlice() calls 1 function(s): testBodyBindingSlice.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free