Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2801)

Unified Diff: base/stack_container_unittest.cc

Issue 9456032: Make StackContainer test pass on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include path Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/stack_container.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stack_container_unittest.cc
diff --git a/base/stack_container_unittest.cc b/base/stack_container_unittest.cc
index 175df36d3cdb9081b232f3b46d1ca09b0ca3a1d7..03b520a7cc8b433f8261e83f557b11f34bdfddb5 100644
--- a/base/stack_container_unittest.cc
+++ b/base/stack_container_unittest.cc
@@ -121,9 +121,17 @@ TEST(StackContainer, BufferAlignment) {
doubles->push_back(0.0);
EXPECT_ALIGNED(&doubles[0], ALIGNOF(double));
+ StackVector<AlignedData<16>, 1> aligned16;
+ aligned16->push_back(AlignedData<16>());
+ EXPECT_ALIGNED(&aligned16[0], 16);
+
+#if !defined(OS_ANDROID)
+ // It seems that android doesn't respect greater than 16 byte alignment for
+ // non-POD data on the stack, even though ALIGNOF(aligned256) == 256.
StackVector<AlignedData<256>, 1> aligned256;
aligned256->push_back(AlignedData<256>());
EXPECT_ALIGNED(&aligned256[0], 256);
+#endif
}
#ifdef COMPILER_MSVC
« no previous file with comments | « base/stack_container.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698