Lines Matching refs:printToString

19 template<typename T> std::string printToString(const T &Value) {  in printToString()  function
28 template<typename T> std::string printToString(const T &Value, in printToString() function
52 EXPECT_EQ("c", printToString('c')); in TEST()
55 EXPECT_EQ("hello", printToString("hello")); in TEST()
56 EXPECT_EQ("hello", printToString(std::string("hello"))); in TEST()
59 EXPECT_EQ("0", printToString(0)); in TEST()
60 EXPECT_EQ("2425", printToString(2425)); in TEST()
61 EXPECT_EQ("-2425", printToString(-2425)); in TEST()
64 EXPECT_EQ("0", printToString(0LL)); in TEST()
65 EXPECT_EQ("257257257235709", printToString(257257257235709LL)); in TEST()
66 EXPECT_EQ("-257257257235709", printToString(-257257257235709LL)); in TEST()
69 EXPECT_EQ("1.100000e+00", printToString(1.1)); in TEST()
72 EXPECT_EQ("0x0", printToString((void*) nullptr)); in TEST()
73 EXPECT_EQ("0xbeef", printToString((void*) 0xbeefLL)); in TEST()
74 EXPECT_EQ("0xdeadbeef", printToString((void*) 0xdeadbeefLL)); in TEST()
77 EXPECT_EQ("18446744073709551615", printToString(UINT64_MAX)); in TEST()
78 EXPECT_EQ("-9223372036854775808", printToString(INT64_MIN)); in TEST()
113 EXPECT_EQ("1.20", printToString(format("%.2f", 1.2), 1)); in TEST()
114 EXPECT_EQ("1.20", printToString(format("%.2f", 1.2), 2)); in TEST()
115 EXPECT_EQ("1.20", printToString(format("%.2f", 1.2), 3)); in TEST()
116 EXPECT_EQ("1.20", printToString(format("%.2f", 1.2), 4)); in TEST()
117 EXPECT_EQ("1.20", printToString(format("%.2f", 1.2), 10)); in TEST()
147 EXPECT_EQ("xyz ", printToString(left_justify("xyz", 6), 6)); in TEST()
148 EXPECT_EQ("abc", printToString(left_justify("abc", 3), 3)); in TEST()
149 EXPECT_EQ("big", printToString(left_justify("big", 1), 3)); in TEST()
150 EXPECT_EQ(" xyz", printToString(right_justify("xyz", 6), 6)); in TEST()
151 EXPECT_EQ("abc", printToString(right_justify("abc", 3), 3)); in TEST()
152 EXPECT_EQ("big", printToString(right_justify("big", 1), 3)); in TEST()
156 EXPECT_EQ("0x1234", printToString(format_hex(0x1234, 6), 6)); in TEST()
157 EXPECT_EQ("0x001234", printToString(format_hex(0x1234, 8), 8)); in TEST()
158 EXPECT_EQ("0x00001234", printToString(format_hex(0x1234, 10), 10)); in TEST()
159 EXPECT_EQ("0x1234", printToString(format_hex(0x1234, 4), 6)); in TEST()
160 EXPECT_EQ("0xff", printToString(format_hex(255, 4), 4)); in TEST()
161 EXPECT_EQ("0xFF", printToString(format_hex(255, 4, true), 4)); in TEST()
162 EXPECT_EQ("0x1", printToString(format_hex(1, 3), 3)); in TEST()
163 EXPECT_EQ("0x12", printToString(format_hex(0x12, 3), 4)); in TEST()
164 EXPECT_EQ("0x123", printToString(format_hex(0x123, 3), 5)); in TEST()
165 EXPECT_EQ("FF", printToString(format_hex_no_prefix(0xFF, 2, true), 4)); in TEST()
166 EXPECT_EQ("ABCD", printToString(format_hex_no_prefix(0xABCD, 2, true), 4)); in TEST()
168 printToString(format_hex(UINT64_MAX, 18), 18)); in TEST()
170 printToString(format_hex((INT64_MIN), 18), 18)); in TEST()
174 EXPECT_EQ(" 0", printToString(format_decimal(0, 4), 4)); in TEST()
175 EXPECT_EQ(" -1", printToString(format_decimal(-1, 4), 4)); in TEST()
176 EXPECT_EQ(" -1", printToString(format_decimal(-1, 6), 6)); in TEST()
177 EXPECT_EQ("1234567890", printToString(format_decimal(1234567890, 10), 10)); in TEST()
179 printToString(format_decimal(INT64_MAX, 21), 21)); in TEST()
181 printToString(format_decimal(INT64_MIN, 21), 21)); in TEST()