diff options
author | Yifan Hong <elsk@google.com> | 2019-09-12 13:07:37 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2019-09-12 15:55:16 -0700 |
commit | 87ea73fe5a48c54ad56ba769375d180d1ce5c614 (patch) | |
tree | 4e3110fb2f22ceb452662be37815cb8a00996a3d /dynamic_partition_test_utils.h | |
parent | 48598e8b0d485b214610a0688cb935f86dc93b64 (diff) |
dynamic_partition_test_utils: use libstorage_literals_headers
We have a better library now.
Test: boot_control_android_unittest
Change-Id: Id4a4ecd9e0883511c4edbe4d548ede5d57d372f0
Diffstat (limited to 'dynamic_partition_test_utils.h')
-rw-r--r-- | dynamic_partition_test_utils.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/dynamic_partition_test_utils.h b/dynamic_partition_test_utils.h index 574d30e8..61d8e0a3 100644 --- a/dynamic_partition_test_utils.h +++ b/dynamic_partition_test_utils.h @@ -30,6 +30,7 @@ #include <gmock/gmock.h> #include <gtest/gtest.h> #include <liblp/builder.h> +#include <storage_literals/storage_literals.h> #include "update_engine/common/boot_control_interface.h" @@ -41,6 +42,7 @@ using testing::MakeMatcher; using testing::Matcher; using testing::MatcherInterface; using testing::MatchResultListener; +using namespace android::storage_literals; // NOLINT(build/namespaces) constexpr const uint32_t kMaxNumSlots = 2; constexpr const char* kSlotSuffixes[kMaxNumSlots] = {"_a", "_b"}; @@ -59,17 +61,6 @@ using PartitionSuffixSizes = std::map<std::string, uint64_t>; using PartitionMetadata = BootControlInterface::PartitionMetadata; -// C++ standards do not allow uint64_t (aka unsigned long) to be the parameter -// of user-defined literal operators. -// clang-format off -inline constexpr unsigned long long operator"" _MiB(unsigned long long x) { // NOLINT - return x << 20; -} -inline constexpr unsigned long long operator"" _GiB(unsigned long long x) { // NOLINT - return x << 30; -} -// clang-format on - constexpr uint64_t kDefaultGroupSize = 5_GiB; // Super device size. 1 MiB for metadata. constexpr uint64_t kDefaultSuperSize = kDefaultGroupSize * 2 + 1_MiB; |