MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / TestUnmarshalIntContainingAFloatString

Function TestUnmarshalIntContainingAFloatString

events/attributevalue_test.go:122–134  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestUnmarshalIntContainingAFloatString(t *testing.T) {
123 input := []byte(`{ "N": "123.45"}`)
124
125 var av DynamoDBAttributeValue
126 err := json.Unmarshal(input, &av)
127
128 assert.Nil(t, err)
129
130 var i int64
131 i, err = av.Integer()
132 assert.Nil(t, err)
133 assert.Equal(t, int64(123), i)
134}
135
136func TestUnmarshalNumberSet(t *testing.T) {
137 input := []byte(`{ "NS": ["1234", "567.8"] }`)

Callers

nothing calls this directly

Calls 1

IntegerMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…