Test StrCat of ints and longs of various sizes and signdedness.
| 27 | |
| 28 | // Test StrCat of ints and longs of various sizes and signdedness. |
| 29 | TEST(FpToString, Ints) { |
| 30 | for (int s = 0; s < 64; s++) { |
| 31 | for (int delta = -1; delta <= 1; delta++) { |
| 32 | uint64 fp = (1ull << s) + delta; |
| 33 | string s = FpToString(fp); |
| 34 | uint64 fp2; |
| 35 | EXPECT_TRUE(StringToFp(s, &fp2)); |
| 36 | EXPECT_EQ(fp, fp2); |
| 37 | } |
| 38 | } |
| 39 | Fprint dummy; |
| 40 | EXPECT_FALSE(StringToFp("", &dummy)); |
| 41 | EXPECT_FALSE(StringToFp("xyz", &dummy)); |
| 42 | EXPECT_FALSE(StringToFp("0000000000000000xyz", &dummy)); |
| 43 | } |
| 44 | |
| 45 | TEST(Uint64ToHexString, Ints) { |
| 46 | for (int s = 0; s < 64; s++) { |
nothing calls this directly
no test coverage detected