You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/04/30 22:59:20 UTC
[trafficserver] branch master updated: Tries to make builds on
older clang happy
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e68b191 Tries to make builds on older clang happy
e68b191 is described below
commit e68b191d04e0df1d2be51196acb8779431d7e9cc
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Tue Apr 30 10:19:15 2019 -0600
Tries to make builds on older clang happy
---
.../experimental/slice/unit-tests/test_config.cc | 26 +++++++++++++++-------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/plugins/experimental/slice/unit-tests/test_config.cc b/plugins/experimental/slice/unit-tests/test_config.cc
index fcd1b8e..b85f381 100644
--- a/plugins/experimental/slice/unit-tests/test_config.cc
+++ b/plugins/experimental/slice/unit-tests/test_config.cc
@@ -36,13 +36,23 @@ TEST_CASE("config default", "[AWS][slice][utility]")
TEST_CASE("config bytesfrom valid parsing", "[AWS][slice][utility]")
{
- static std::array<std::string, 6> const teststrings = {
- "1000", "1m", "5g", "2k", "3kb", "1z",
- };
+ static std::array<std::string, 6> const teststrings = {{
+ "1000",
+ "1m",
+ "5g",
+ "2k",
+ "3kb",
+ "1z",
+ }};
- constexpr std::array<int64_t, 6> const expvals = {
- 1000, 1024 * 1024, int64_t(1024) * 1024 * 1024 * 5, 1024 * 2, 1024 * 3, 1,
- };
+ constexpr std::array<int64_t, 6> const expvals = {{
+ 1000,
+ 1024 * 1024,
+ int64_t(1024) * 1024 * 1024 * 5,
+ 1024 * 2,
+ 1024 * 3,
+ 1,
+ }};
for (size_t index = 0; index < teststrings.size(); ++index) {
std::string const &teststr = teststrings[index];
@@ -58,13 +68,13 @@ TEST_CASE("config bytesfrom valid parsing", "[AWS][slice][utility]")
TEST_CASE("config bytesfrom invalid parsing", "[AWS][slice][utility]")
{
- static std::array<std::string, 5> const badstrings = {
+ static std::array<std::string, 5> const badstrings = {{
"abc", // alpha
"g00", // giga
"M00", // mega
"k00", // kilo
"-500", // negative
- };
+ }};
for (std::string const &badstr : badstrings) {
int64_t const val = Config::bytesFrom(badstr.c_str());