tensorflow/core/platform/strcat_test.cc
// Test StrCat of ints and longs of various sizes and signdedness.
Test StrCat of ints and longs of various sizes and signdedness.
Test StrCat of ints and longs of various sizes and signdedness .
TEST(StrCat, Ints) {
  const int16_t s = -1;
  const uint16 us = 2;
  const int i = -3;
  const unsigned int ui = 4;
  const int32_t l = -5;
  const uint32 ul = 6;
  const int64_t ll = -7;
  const uint64 ull = 8;
  const ptrdiff_t ptrdiff = -9;
  const size_t size = 10;
  const ssize_t ssize = -11;
  const intptr_t intptr = -12;
  const uintptr_t uintptr = 13;
  string answer;
  answer = tensorflow::strings::StrCat(s, us);
  EXPECT_EQ(answer, "-12");
  answer = tensorflow::strings::StrCat(i, ui);
  EXPECT_EQ(answer, "-34");
  answer = tensorflow::strings::StrCat(l, ul);
  EXPECT_EQ(answer, "-56");
  answer = tensorflow::strings::StrCat(ll, ull);
  EXPECT_EQ(answer, "-78");
  answer = tensorflow::strings::StrCat(ptrdiff, size);
  EXPECT_EQ(answer, "-910");
  answer = tensorflow::strings::StrCat(ssize, intptr);
  EXPECT_EQ(answer, "-11-12");
  answer = tensorflow::strings::StrCat(uintptr, 0);
  EXPECT_EQ(answer, "130");
}
TEST ( StrCat , Ints ) { const int16_t s = -1 ; const uint16 us = 2 ; const int i = -3 ; const unsigned int ui = 4 ; const int32_t l = -5 ; const uint32 ul = 6 ; const int64_t ll = -7 ; const uint64 ull = 8 ; const ptrdiff_t ptrdiff = -9 ; const size_t size = 10 ; const ssize_t ssize = -11 ; const intptr_t intptr = -12 ; const uintptr_t uintptr = 13 ; string answer ; answer = tensorflow :: strings :: StrCat ( s , us ) ; EXPECT_EQ ( answer , " " ) ; answer = tensorflow :: strings :: StrCat ( i , ui ) ; EXPECT_EQ ( answer , " " ) ; answer = tensorflow :: strings :: StrCat ( l , ul ) ; EXPECT_EQ ( answer , " " ) ; answer = tensorflow :: strings :: StrCat ( ll , ull ) ; EXPECT_EQ ( answer , " " ) ; answer = tensorflow :: strings :: StrCat ( ptrdiff , size ) ; EXPECT_EQ ( answer , " " ) ; answer = tensorflow :: strings :: StrCat ( ssize , intptr ) ; EXPECT_EQ ( answer , " " ) ; answer = tensorflow :: strings :: StrCat ( uintptr , 0 ) ; EXPECT_EQ ( answer , " " ) ; }
Test StrCat of ints and longs of various sizes and signdedness.
Test StrCat of ints and longs of various sizes and signdedness .