From fc983a64e86a0b756c91db501d660bc02edd1609 Mon Sep 17 00:00:00 2001 From: open-license-manager <rillf@maildrop.cc> Date: 周二, 14 10月 2014 07:36:06 +0800 Subject: [PATCH] linux test ok --- test/library/Os_Linux_test.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/test/library/Os_Linux_test.cpp b/test/library/Os_Linux_test.cpp index bbb0bf6..f87e3bc 100644 --- a/test/library/Os_Linux_test.cpp +++ b/test/library/Os_Linux_test.cpp @@ -43,7 +43,12 @@ if (string(adapter_info[i].description) == "lo") { BOOST_CHECK_NE(adapter_info[i].ipv4_address[0], 0); } else { - BOOST_CHECK_NE(adapter_info[i].mac_address[0], 0); + bool mac_is_0 = true; + for(int j=0;j<6;j++){ + mac_is_0 = mac_is_0 && (adapter_info[i].mac_address[j]==0); + } + BOOST_CHECK_MESSAGE( !mac_is_0, + "Mac address for interface " << adapter_info[i].description << " is 0"); } } free(adapter_info); -- Gitblit v1.9.1