New upstream version 8.1.0
This commit is contained in:
17
common/tests/TestNIC.cpp
Normal file
17
common/tests/TestNIC.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <common/net/sock/NetworkInterfaceCard.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(NIC, nic)
|
||||
{
|
||||
NicAddressList list;
|
||||
StringList allowedInterfaces;
|
||||
|
||||
ASSERT_TRUE(NetworkInterfaceCard::findAll(&allowedInterfaces, true, &list));
|
||||
|
||||
ASSERT_FALSE(list.empty());
|
||||
|
||||
NicAddress nicAddr;
|
||||
|
||||
ASSERT_TRUE(NetworkInterfaceCard::findByName(list.begin()->name, &nicAddr));
|
||||
}
|
||||
Reference in New Issue
Block a user