1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-10 09:50:58 +02:00

add unit test (key.String) to key api (#260)

follow issue #51
This commit is contained in:
Cheng-Lung Sung 2019-11-01 00:31:46 +08:00 committed by rghetia
parent 8862436993
commit 903908ddad

View File

@ -71,6 +71,14 @@ func TestKeyValueConstructors(t *testing.T) {
Value: core.Float32(123.5),
},
},
{
name: "String",
actual: key.String("k1", "123.5"),
expected: core.KeyValue{
Key: "k1",
Value: core.String("123.5"),
},
},
{
name: "Int",
actual: key.Int("k1", 123),