#include #include #include #include #if defined(PLATFORM_WIN32) #include #else #include #include #endif int main (void) { cruft::TAP::logger tap; uint16_t val16 = 0x1358; uint32_t val32 = 0x12345678; tap.expect_eq (htons (val16), cruft::hton (val16), "htons"); tap.expect_eq (htonl (val32), cruft::hton (val32), "htonl"); tap.expect_eq (ntohs (val16), cruft::hton (val16), "ntohs"); tap.expect_eq (ntohl (val32), cruft::hton (val32), "ntohl"); return tap.status (); }