Added failure casex

This commit is contained in:
Aaron 2015-07-30 12:47:10 -07:00
parent bf92f710e8
commit 385fb20cdf

View file

@ -24,4 +24,13 @@ TEST(GetComputerName,simple)
ASSERT_TRUE(getComputerName == TRUE);
ASSERT_EQ(host,TRUE);
ASSERT_EQ(hostnameString,hostnameStringTest);
}
TEST(GetComputerName,buffertosmall)
{
char hostname[HOST_NAME_MAX];
std::string hostnameFunctionTest;
DWORD hostSize = 0;
BOOL getComputerName = GetComputerName(&hostnameFunctionTest[0], &hostSize);
ASSERT_TRUE(getComputerName != 0);
}