diff options
author | 2018-08-31 08:17:35 -0700 | |
---|---|---|
committer | 2018-08-31 08:23:27 -0700 | |
commit | fe01657f67220fc4e4708e579077157e8f525fc1 (patch) | |
tree | 2c42a61b41ec258dc8cefc8d804d5766ed4274f0 /tensorflow/core/lib | |
parent | 4902db818664b62f60c0f9572cc939f596d1c8bc (diff) |
Renamed tensorflow::strings::PadSpec enum values to match absl::PadSpec enum values.
This is necessary in order to replace tensorflow::strings::StrCat with absl::StrCat.
PiperOrigin-RevId: 211087745
Diffstat (limited to 'tensorflow/core/lib')
-rw-r--r-- | tensorflow/core/lib/strings/strcat.h | 34 | ||||
-rw-r--r-- | tensorflow/core/lib/strings/strcat_test.cc | 8 |
2 files changed, 21 insertions, 21 deletions
diff --git a/tensorflow/core/lib/strings/strcat.h b/tensorflow/core/lib/strings/strcat.h index 2c036a3040..a620f59447 100644 --- a/tensorflow/core/lib/strings/strcat.h +++ b/tensorflow/core/lib/strings/strcat.h @@ -59,29 +59,29 @@ namespace tensorflow { namespace strings { enum PadSpec { - NO_PAD = 1, - ZERO_PAD_2, - ZERO_PAD_3, - ZERO_PAD_4, - ZERO_PAD_5, - ZERO_PAD_6, - ZERO_PAD_7, - ZERO_PAD_8, - ZERO_PAD_9, - ZERO_PAD_10, - ZERO_PAD_11, - ZERO_PAD_12, - ZERO_PAD_13, - ZERO_PAD_14, - ZERO_PAD_15, - ZERO_PAD_16, + kNoPad = 1, + kZeroPad2, + kZeroPad3, + kZeroPad4, + kZeroPad5, + kZeroPad6, + kZeroPad7, + kZeroPad8, + kZeroPad9, + kZeroPad10, + kZeroPad11, + kZeroPad12, + kZeroPad13, + kZeroPad14, + kZeroPad15, + kZeroPad16 }; struct Hex { uint64 value; enum PadSpec spec; template <class Int> - explicit Hex(Int v, PadSpec s = NO_PAD) : spec(s) { + explicit Hex(Int v, PadSpec s = kNoPad) : spec(s) { // Prevent sign-extension by casting integers to // their unsigned counterparts. static_assert( diff --git a/tensorflow/core/lib/strings/strcat_test.cc b/tensorflow/core/lib/strings/strcat_test.cc index 8cc64a6f0a..6c4e5526b1 100644 --- a/tensorflow/core/lib/strings/strcat_test.cc +++ b/tensorflow/core/lib/strings/strcat_test.cc @@ -308,11 +308,11 @@ TEST(StrAppend, Death) { static void CheckHex64(uint64 v) { using tensorflow::strings::Hex; - string actual = StrCat(Hex(v, tensorflow::strings::ZERO_PAD_16)); + string actual = StrCat(Hex(v, tensorflow::strings::kZeroPad16)); string expected = Printf("%016llx", static_cast<unsigned long long>(v)); EXPECT_EQ(expected, actual) << " decimal value " << v; - actual = StrCat(Hex(v, tensorflow::strings::ZERO_PAD_8)); + actual = StrCat(Hex(v, tensorflow::strings::kZeroPad8)); expected = Printf("%08llx", static_cast<unsigned long long>(v)); EXPECT_EQ(expected, actual) << " decimal value " << v; @@ -323,7 +323,7 @@ static void CheckHex64(uint64 v) { static void CheckHex32(uint32 v) { using tensorflow::strings::Hex; - string actual = StrCat(Hex(v, tensorflow::strings::ZERO_PAD_8)); + string actual = StrCat(Hex(v, tensorflow::strings::kZeroPad8)); string expected = Printf("%08x", v); EXPECT_EQ(expected, actual) << " decimal value " << v; @@ -334,7 +334,7 @@ static void CheckHex32(uint32 v) { static void CheckHexSigned32(int32 v) { using tensorflow::strings::Hex; - string actual = StrCat(Hex(v, tensorflow::strings::ZERO_PAD_8)); + string actual = StrCat(Hex(v, tensorflow::strings::kZeroPad8)); string expected = Printf("%08x", v); EXPECT_EQ(expected, actual) << " decimal value " << v; |