Commit 4c0ddd98 authored by Francis Ma's avatar Francis Ma Committed by facebook-github-bot-0

Loosen restriction to get folly::future::CoreTest pass on android

Summary: Due to different way of padding, CoreTest failed on android. Loosen the check to make it pass.

Reviewed By: mzlee

Differential Revision: D2907987

fb-gh-sync-id: 81d715725d6908ec7b259b0a67789a91ed63df71
parent 1ef44c0c
......@@ -21,6 +21,14 @@
using namespace folly;
// On android, we see a different way of memory alignment of this structure.
// Adding some extra padding to make it pass.
#ifdef __ANDROID_
constexpr size_t extraPadding = 8;
#else
constexpr size_t extraPadding = 0;
#endif
TEST(Core, size) {
struct Gold {
char lambdaBuf_[8 * sizeof(void*)];
......@@ -40,5 +48,5 @@ TEST(Core, size) {
};
// If this number goes down, it's fine!
// If it goes up, please seek professional advice ;-)
EXPECT_GE(sizeof(Gold), sizeof(detail::Core<Unit>));
EXPECT_GE(sizeof(Gold) + extraPadding, sizeof(detail::Core<Unit>));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment