@@ -109,6 +109,11 @@ func TestValue(t *testing.T) {
109109 NewInsufficientBytesError ([]byte {0x01 , 0x02 , 0x03 , 0x04 }, []byte {0x01 , 0x02 , 0x03 , 0x04 }),
110110 nil ,
111111 },
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+ },
112117 {
113118 "StringValue/Success" , Value .StringValue , Value {Type : bsontype .String , Data : AppendString (nil , "hello, world!" )},
114119 nil ,
@@ -124,6 +129,11 @@ func TestValue(t *testing.T) {
124129 nil ,
125130 []interface {}{string ("" ), false },
126131 },
132+ {
133+ "StringValueOK/Zero Length" , Value .StringValueOK , Value {Type : bsontype .String , Data : []byte {0x00 , 0x00 , 0x00 , 0x00 }},
134+ nil ,
135+ []interface {}{string ("" ), false },
136+ },
127137 {
128138 "StringValueOK/Success" , Value .StringValueOK , Value {Type : bsontype .String , Data : AppendString (nil , "hello, world!" )},
129139 nil ,
0 commit comments