aboutsummaryrefslogtreecommitdiffstats
path: root/brillo
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@google.com>2015-10-23 13:44:51 -0700
committerAlex Vakulenko <avakulenko@google.com>2015-10-23 13:48:57 -0700
commitd4d2d739c3b22e686881df519fc40e6f331d5eae (patch)
treefcbc4334e3c49ae80c27c440bef440542ffa8ba0 /brillo
parent8d6301aa107d64d92bb0257ded486591391bfe41 (diff)
downloadplatform_external_libbrillo-d4d2d739c3b22e686881df519fc40e6f331d5eae.tar.gz
platform_external_libbrillo-d4d2d739c3b22e686881df519fc40e6f331d5eae.tar.bz2
platform_external_libbrillo-d4d2d739c3b22e686881df519fc40e6f331d5eae.zip
Fix Any::Buffer.Store_Objects unit test
Any normally embeds small data objects (with the size of up to double). This test verifies that larger objects are stored externally. However 10 bytes is not large enough and on some platform due to data alignment/padding a bit larger data than that of double can still be stored inside Any itself. Use 20 bytes to guarantee that Any cannot contain the buffer of that size inside. Change-Id: Iceaa0efbc74570f17d2cc70aa8d6537cc8bd2be5
Diffstat (limited to 'brillo')
-rw-r--r--brillo/any_internal_impl_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/brillo/any_internal_impl_unittest.cc b/brillo/any_internal_impl_unittest.cc
index 5e64926..4f39939 100644
--- a/brillo/any_internal_impl_unittest.cc
+++ b/brillo/any_internal_impl_unittest.cc
@@ -82,7 +82,7 @@ TEST(Buffer, Store_Objects) {
EXPECT_STREQ(typeid(Small).name(), buffer.GetDataPtr()->GetTypeName());
struct Large {
- char c[10];
+ char c[20];
} large = {};
buffer.Assign(large);
EXPECT_FALSE(buffer.IsEmpty());