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

Function TestUnmarshalInteger

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

Source from the content-addressed store, hash-verified

92}
93
94func TestUnmarshalInteger(t *testing.T) {
95 input := []byte(`{ "N": "123"}`)
96
97 var av DynamoDBAttributeValue
98 err := json.Unmarshal(input, &av)
99
100 assert.Nil(t, err)
101
102 var i int64
103 i, err = av.Integer()
104 assert.Nil(t, err)
105 assert.Equal(t, int64(123), i)
106}
107
108func TestUnmarshalFloat(t *testing.T) {
109 input := []byte(`{ "N": "123.45"}`)

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…