summaryrefslogtreecommitdiff
path: root/chromium/base/lazy_instance_unittest.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/base/lazy_instance_unittest.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/lazy_instance_unittest.cc')
-rw-r--r--chromium/base/lazy_instance_unittest.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chromium/base/lazy_instance_unittest.cc b/chromium/base/lazy_instance_unittest.cc
index d1012ef6984..ad1f0ebf44c 100644
--- a/chromium/base/lazy_instance_unittest.cc
+++ b/chromium/base/lazy_instance_unittest.cc
@@ -5,6 +5,7 @@
#include <stddef.h>
#include <memory>
+#include <utility>
#include <vector>
#include "base/at_exit.h"
@@ -13,6 +14,7 @@
#include "base/barrier_closure.h"
#include "base/bind.h"
#include "base/lazy_instance.h"
+#include "base/memory/aligned_memory.h"
#include "base/system/sys_info.h"
#include "base/threading/platform_thread.h"
#include "base/threading/simple_thread.h"
@@ -178,9 +180,6 @@ class AlignedData {
} // namespace
-#define EXPECT_ALIGNED(ptr, align) \
- EXPECT_EQ(0u, reinterpret_cast<uintptr_t>(ptr) & (align - 1))
-
TEST(LazyInstanceTest, Alignment) {
using base::LazyInstance;
@@ -194,9 +193,9 @@ TEST(LazyInstanceTest, Alignment) {
static LazyInstance<AlignedData<4096>>::DestructorAtExit align4096 =
LAZY_INSTANCE_INITIALIZER;
- EXPECT_ALIGNED(align4.Pointer(), 4);
- EXPECT_ALIGNED(align32.Pointer(), 32);
- EXPECT_ALIGNED(align4096.Pointer(), 4096);
+ EXPECT_TRUE(base::IsAligned(align4.Pointer(), 4));
+ EXPECT_TRUE(base::IsAligned(align32.Pointer(), 32));
+ EXPECT_TRUE(base::IsAligned(align4096.Pointer(), 4096));
}
namespace {