TestState_GetGeneric() — fiber Function Reference
Architecture documentation for the TestState_GetGeneric() function in state_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD bc2d9e32_d12f_520d_d8c2_de9be9db164c["TestState_GetGeneric()"] 040d1690_51eb_9416_23b2_7b1543e92d65["state_test.go"] bc2d9e32_d12f_520d_d8c2_de9be9db164c -->|defined in| 040d1690_51eb_9416_23b2_7b1543e92d65 82cafbd6_0500_4cf9_b52e_4909eec3eb32["runGenericTest()"] bc2d9e32_d12f_520d_d8c2_de9be9db164c -->|calls| 82cafbd6_0500_4cf9_b52e_4909eec3eb32 style bc2d9e32_d12f_520d_d8c2_de9be9db164c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
state_test.go lines 493–515
func TestState_GetGeneric(t *testing.T) {
t.Parallel()
runGenericTest(t, GetState[int], []testCase[int]{
{name: "int correct conversion", key: "num", value: 42, expected: 42, ok: true},
{name: "int wrong conversion from string", key: "str", value: "abc", expected: 0, ok: false},
})
runGenericTest(t, GetState[string], []testCase[string]{
{name: "string correct conversion", key: "strVal", value: "hello", expected: "hello", ok: true},
{name: "string wrong conversion from int", key: "intVal", value: 100, expected: "", ok: false},
})
runGenericTest(t, GetState[bool], []testCase[bool]{
{name: "bool correct conversion", key: "flag", value: true, expected: true, ok: true},
{name: "bool wrong conversion from int", key: "intFlag", value: 1, expected: false, ok: false},
})
runGenericTest(t, GetState[float64], []testCase[float64]{
{name: "float64 correct conversion", key: "pi", value: 3.14, expected: 3.14, ok: true},
{name: "float64 wrong conversion from int", key: "intVal", value: 10, expected: 0.0, ok: false},
})
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does TestState_GetGeneric() do?
TestState_GetGeneric() is a function in the fiber codebase, defined in state_test.go.
Where is TestState_GetGeneric() defined?
TestState_GetGeneric() is defined in state_test.go at line 493.
What does TestState_GetGeneric() call?
TestState_GetGeneric() calls 1 function(s): runGenericTest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free