MCPcopy Create free account
hub / github.com/aws/smithy-go / TestEncoder_Encode

Function TestEncoder_Encode

document/json/encoder_test.go:12–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestEncoder_Encode(t *testing.T) {
13 t.Run("Object", func(t *testing.T) {
14 for name, tt := range sharedObjectTests {
15 t.Run(name, func(t *testing.T) {
16 testEncode(t, tt)
17 })
18 }
19 })
20 t.Run("Array", func(t *testing.T) {
21 for name, tt := range sharedArrayTestCases {
22 t.Run(name, func(t *testing.T) {
23 testEncode(t, tt)
24 })
25 }
26 })
27 t.Run("Number", func(t *testing.T) {
28 for name, tt := range sharedNumberTestCases {
29 t.Run(name, func(t *testing.T) {
30 testEncode(t, tt)
31 })
32 }
33 })
34 t.Run("String", func(t *testing.T) {
35 for name, tt := range sharedStringTests {
36 t.Run(name, func(t *testing.T) {
37 testEncode(t, tt)
38 })
39 }
40 })
41}
42
43func TestNewEncoderUnsupportedTypes(t *testing.T) {
44 type customTime time.Time

Callers

nothing calls this directly

Calls 1

testEncodeFunction · 0.85

Tested by

no test coverage detected