Add simple unit tests for DataBuf
This commit is contained in:
parent
72cf9166fe
commit
752e7a6bea
@ -23,4 +23,16 @@ TEST(ExivTime, doesNotGetTimeWithBadFormedString)
|
||||
ASSERT_EQ(1, exifTime("007:a5:24 aa:bb:cc", &tmInstance));
|
||||
}
|
||||
|
||||
TEST(DataBuf, pointsToNullByDefault)
|
||||
{
|
||||
DataBuf instance;
|
||||
ASSERT_EQ(NULL, instance.pData_);
|
||||
ASSERT_EQ(0, instance.size_);
|
||||
}
|
||||
|
||||
TEST(DataBuf, allocatesDataWithNonEmptyConstructor)
|
||||
{
|
||||
DataBuf instance (5);
|
||||
ASSERT_NE(static_cast<byte *>(NULL), instance.pData_); /// \todo use nullptr once we move to c++11
|
||||
ASSERT_EQ(5, instance.size_);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user