diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-09-19 11:40:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-19 11:40:10 +0200 |
commit | eb6be1d92ddcc8258f31e5b2045dad90808e0381 (patch) | |
tree | 6697dc16486139bfe4536a01168b6fadd6cb2e7a | |
parent | 4746c714d1a59e69a75bc328cb52b540445fa04f (diff) | |
parent | d1960bf491d568c0c4bf1420cf51fede897a1d4b (diff) |
Merge pull request #10708 from vespa-engine/toregge/port-fnet-info-test-to-darwin
Port fnet_info test to darwin.
-rw-r--r-- | fnet/src/tests/info/info.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fnet/src/tests/info/info.cpp b/fnet/src/tests/info/info.cpp index b91b9fa4b39..938ea1b7f15 100644 --- a/fnet/src/tests/info/info.cpp +++ b/fnet/src/tests/info/info.cpp @@ -69,19 +69,23 @@ TEST("info") { TEST("size of important objects") { - EXPECT_EQUAL(168u, sizeof(FNET_IOComponent)); +#ifdef __APPLE__ + constexpr size_t MUTEX_SIZE = 64u; +#else + constexpr size_t MUTEX_SIZE = 40u; +#endif + EXPECT_EQUAL(MUTEX_SIZE + 128u, sizeof(FNET_IOComponent)); EXPECT_EQUAL(32u, sizeof(FNET_Channel)); EXPECT_EQUAL(40u, sizeof(FNET_PacketQueue_NoLock)); - EXPECT_EQUAL(472u, sizeof(FNET_Connection)); + EXPECT_EQUAL(MUTEX_SIZE + 432u, sizeof(FNET_Connection)); EXPECT_EQUAL(48u, sizeof(std::condition_variable)); EXPECT_EQUAL(56u, sizeof(FNET_DataBuffer)); EXPECT_EQUAL(24u, sizeof(FastOS_Time)); EXPECT_EQUAL(8u, sizeof(FNET_Context)); EXPECT_EQUAL(8u, sizeof(fastos::TimeStamp)); - EXPECT_EQUAL(40u, sizeof(std::mutex)); - EXPECT_EQUAL(40u, sizeof(pthread_mutex_t)); + EXPECT_EQUAL(MUTEX_SIZE, sizeof(std::mutex)); + EXPECT_EQUAL(MUTEX_SIZE, sizeof(pthread_mutex_t)); EXPECT_EQUAL(48u, sizeof(pthread_cond_t)); - EXPECT_EQUAL(40u, sizeof(std::mutex)); EXPECT_EQUAL(48u, sizeof(std::condition_variable)); } |