@@ -109,6 +109,11 @@ func TestValue(t *testing.T) {
109
109
NewInsufficientBytesError ([]byte {0x01 , 0x02 , 0x03 , 0x04 }, []byte {0x01 , 0x02 , 0x03 , 0x04 }),
110
110
nil ,
111
111
},
112
+ {
113
+ "StringValue/Zero Length" , Value .StringValue , Value {Type : bsontype .String , Data : []byte {0x00 , 0x00 , 0x00 , 0x00 }},
114
+ NewInsufficientBytesError ([]byte {0x00 , 0x00 , 0x00 , 0x00 }, []byte {0x00 , 0x00 , 0x00 , 0x00 }),
115
+ nil ,
116
+ },
112
117
{
113
118
"StringValue/Success" , Value .StringValue , Value {Type : bsontype .String , Data : AppendString (nil , "hello, world!" )},
114
119
nil ,
@@ -124,6 +129,11 @@ func TestValue(t *testing.T) {
124
129
nil ,
125
130
[]interface {}{string ("" ), false },
126
131
},
132
+ {
133
+ "StringValueOK/Zero Length" , Value .StringValueOK , Value {Type : bsontype .String , Data : []byte {0x00 , 0x00 , 0x00 , 0x00 }},
134
+ nil ,
135
+ []interface {}{string ("" ), false },
136
+ },
127
137
{
128
138
"StringValueOK/Success" , Value .StringValueOK , Value {Type : bsontype .String , Data : AppendString (nil , "hello, world!" )},
129
139
nil ,
0 commit comments