| 161 | } |
| 162 | |
| 163 | TEST(TestHelper, JSONArray) { |
| 164 | // Test the JSONArray helper func |
| 165 | std::string s = |
| 166 | JSONArray(123, -4.5, static_cast<int8_t>(-12), static_cast<uint8_t>(34)); |
| 167 | ASSERT_EQ(s, "[123, -4.5, -12, 34]"); |
| 168 | s = JSONArray(9223372036854775807LL, 9223372036854775808ULL, -9223372036854775807LL - 1, |
| 169 | 18446744073709551615ULL); |
| 170 | ASSERT_EQ(s, |
| 171 | "[9223372036854775807, 9223372036854775808, -9223372036854775808, " |
| 172 | "18446744073709551615]"); |
| 173 | } |
| 174 | |
| 175 | TEST(TestHelper, SafeSignedAdd) { |
| 176 | ASSERT_EQ(0, SafeSignedAdd<int8_t>(-128, -128)); |
no test coverage detected