UDP struct uses IpAddr and MacAddr

This commit is contained in:
Erik Frojdh
2021-09-07 15:16:03 +02:00
parent 9d744deb4a
commit ba52bfb65e
6 changed files with 55 additions and 86 deletions

View File

@@ -9,7 +9,7 @@ TEST_CASE("Get size of empty file") {
char fname[] = "temfile_XXXXXX";
std::ifstream ifs(fname);
auto size = sls::getFileSize(ifs);
REQUIRE(size == 0);
REQUIRE(size <= 0); // -1 or zero
}
TEST_CASE("Get size of file with data") {

View File

@@ -112,4 +112,12 @@ TEST_CASE("Copy construct a MacAddr") {
CHECK(addr == addr2);
}
TEST_CASE("udp dst struct"){
static_assert(sizeof(UdpDestination) == 36);
UdpDestination dst{};
REQUIRE(dst.ip == 0);
}
// TODO!(Erik) Look up a real hostname and verify the IP