From 903908ddad7474813816438319ab84b28ff111ad Mon Sep 17 00:00:00 2001 From: Cheng-Lung Sung Date: Fri, 1 Nov 2019 00:31:46 +0800 Subject: [PATCH] add unit test (key.String) to key api (#260) follow issue #51 --- api/key/key_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/key/key_test.go b/api/key/key_test.go index c1a875a99be..fd08921aa0e 100644 --- a/api/key/key_test.go +++ b/api/key/key_test.go @@ -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),