Skip to content

Commit b15c218

Browse files
committed
GODRIVER-1783 add tests for IsZero for ObjectID and Decimal128 (#533)
1 parent 6cfa339 commit b15c218

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bson/primitive/primitive_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func TestPrimitiveIsZero(t *testing.T) {
4949
nonzero zeroer
5050
}{
5151
{"binary", Binary{}, Binary{Data: []byte{0x01, 0x02, 0x03}, Subtype: 0xFF}},
52+
{"decimal128", Decimal128{}, NewDecimal128(1, 2)},
53+
{"objectID", ObjectID{}, NewObjectID()},
5254
{"regex", Regex{}, Regex{Pattern: "foo", Options: "bar"}},
5355
{"dbPointer", DBPointer{}, DBPointer{DB: "foobar", Pointer: ObjectID{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C}}},
5456
{"timestamp", Timestamp{}, Timestamp{T: 12345, I: 67890}},

0 commit comments

Comments
 (0)