@@ -500,7 +500,8 @@ func TestConvertToValueType_Bytes(t *testing.T) {
500500 }{
501501 {input : & types.Value {Val : & types.Value_BytesVal {BytesVal : []byte {1 , 2 , 3 }}}, expected : []byte {1 , 2 , 3 }},
502502 {input : & types.Value {Val : & types.Value_BytesVal {BytesVal : nil }}, expected : []byte (nil )},
503- {input : & types.Value {Val : & types.Value_StringVal {StringVal : "test" }}, expected : []byte ("test" )},
503+ {input : & types.Value {Val : & types.Value_StringVal {StringVal : "\u0001 \u0002 \u0003 " }}, expected : []byte {1 , 2 , 3 }},
504+ {input : & types.Value {Val : & types.Value_StringVal {StringVal : "dGVzdA==" }}, expected : []byte ("test" )},
504505 }
505506
506507 for _ , tc := range testCases {
@@ -632,7 +633,8 @@ func TestConvertToValueType_BytesList(t *testing.T) {
632633 }{
633634 {input : & types.Value {Val : & types.Value_BytesListVal {BytesListVal : & types.BytesList {Val : [][]byte {{1 , 2 }, {3 , 4 }}}}}, expected : [][]byte {{1 , 2 }, {3 , 4 }}},
634635 {input : & types.Value {Val : & types.Value_BytesListVal {BytesListVal : & types.BytesList {Val : [][]byte {}}}}, expected : [][]byte {}},
635- {input : & types.Value {Val : & types.Value_StringListVal {StringListVal : & types.StringList {Val : []string {"a" , "b" , "c" }}}}, expected : [][]byte {[]byte ("a" ), []byte ("b" ), []byte ("c" )}},
636+ {input : & types.Value {Val : & types.Value_StringListVal {StringListVal : & types.StringList {Val : []string {"\u0001 \u0002 " , "\u0003 \u0004 " }}}}, expected : [][]byte {{1 , 2 }, {3 , 4 }}},
637+ {input : & types.Value {Val : & types.Value_StringListVal {StringListVal : & types.StringList {Val : []string {"YQ==" , "Yg==" , "Yw==" }}}}, expected : [][]byte {[]byte ("a" ), []byte ("b" ), []byte ("c" )}},
636638 {input : & types.Value {Val : & types.Value_StringListVal {StringListVal : & types.StringList {Val : []string {}}}}, expected : [][]byte {}},
637639 }
638640
0 commit comments