You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testutils.cpp
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -225,24 +225,24 @@ class TestUtils : public TestFixture {
225
225
ASSERT_EQUALS(1, ::strToInt<int>("1"));
226
226
ASSERT_EQUALS(-1, ::strToInt<int>("-1"));
227
227
ASSERT_EQUALS(1, ::strToInt<std::size_t>("1"));
228
-
ASSERT_THROW_EQUALS_2(::strToInt<int>(""), std::runtime_error, "converting '' to integer failed - not an integer");
229
-
ASSERT_THROW_EQUALS_2(::strToInt<std::size_t>(""), std::runtime_error, "converting '' to integer failed - not an integer");
230
-
ASSERT_THROW_EQUALS_2(::strToInt<int>(""), std::runtime_error, "converting ' ' to integer failed - not an integer");
231
-
ASSERT_THROW_EQUALS_2(::strToInt<std::size_t>(""), std::runtime_error, "converting ' ' to integer failed - not an integer");
232
-
ASSERT_THROW_EQUALS_2(::strToInt<unsignedint>("-1"), std::runtime_error, "converting '-1' to integer failed - needs to be positive");
233
-
ASSERT_THROW_EQUALS_2(::strToInt<int>("1ms"), std::runtime_error, "converting '1ms' to integer failed - not an integer");
234
-
ASSERT_THROW_EQUALS_2(::strToInt<int>("1.0"), std::runtime_error, "converting '1.0' to integer failed - not an integer");
235
-
ASSERT_THROW_EQUALS_2(::strToInt<int>("one"), std::runtime_error, "converting 'one' to integer failed - not an integer");
236
-
ASSERT_THROW_EQUALS_2(::strToInt<unsignedint>("1ms"), std::runtime_error, "converting '1ms' to integer failed - not an integer");
237
-
ASSERT_THROW_EQUALS_2(::strToInt<unsignedint>("1.0"), std::runtime_error, "converting '1.0' to integer failed - not an integer");
238
-
ASSERT_THROW_EQUALS_2(::strToInt<unsignedint>("one"), std::runtime_error, "converting 'one' to integer failed - not an integer");
239
-
ASSERT_THROW_EQUALS_2(::strToInt<int>(std::to_string(static_cast<int64_t>(std::numeric_limits<int>::max()) + 1)), std::runtime_error, "converting '2147483648' to integer failed - out of range (limits)");
240
-
ASSERT_THROW_EQUALS_2(::strToInt<int>(std::to_string(static_cast<int64_t>(std::numeric_limits<int>::min()) - 1)), std::runtime_error, "converting '-2147483649' to integer failed - out of range (limits)");
241
-
ASSERT_THROW_EQUALS_2(::strToInt<int8_t>(std::to_string(static_cast<int64_t>(std::numeric_limits<int8_t>::max()) + 1)), std::runtime_error, "converting '128' to integer failed - out of range (limits)");
242
-
ASSERT_THROW_EQUALS_2(::strToInt<int8_t>(std::to_string(static_cast<int64_t>(std::numeric_limits<int8_t>::min()) - 1)), std::runtime_error, "converting '-129' to integer failed - out of range (limits)");
243
-
ASSERT_THROW_EQUALS_2(::strToInt<unsignedint>(std::to_string(static_cast<uint64_t>(std::numeric_limits<unsignedint>::max()) + 1)), std::runtime_error, "converting '4294967296' to integer failed - out of range (limits)");
244
-
ASSERT_THROW_EQUALS_2(::strToInt<int>("9223372036854775808"), std::runtime_error, "converting '9223372036854775808' to integer failed - out of range (stoll)"); // LLONG_MAX + 1
245
-
ASSERT_THROW_EQUALS_2(::strToInt<std::size_t>("18446744073709551616"), std::runtime_error, "converting '18446744073709551616' to integer failed - out of range (stoull)"); // ULLONG_MAX + 1
228
+
ASSERT_THROW_EQUALS(::strToInt<int>(""), std::runtime_error, "converting '' to integer failed - not an integer");
229
+
ASSERT_THROW_EQUALS(::strToInt<std::size_t>(""), std::runtime_error, "converting '' to integer failed - not an integer");
230
+
ASSERT_THROW_EQUALS(::strToInt<int>(""), std::runtime_error, "converting ' ' to integer failed - not an integer");
231
+
ASSERT_THROW_EQUALS(::strToInt<std::size_t>(""), std::runtime_error, "converting ' ' to integer failed - not an integer");
232
+
ASSERT_THROW_EQUALS(::strToInt<unsignedint>("-1"), std::runtime_error, "converting '-1' to integer failed - needs to be positive");
233
+
ASSERT_THROW_EQUALS(::strToInt<int>("1ms"), std::runtime_error, "converting '1ms' to integer failed - not an integer");
234
+
ASSERT_THROW_EQUALS(::strToInt<int>("1.0"), std::runtime_error, "converting '1.0' to integer failed - not an integer");
235
+
ASSERT_THROW_EQUALS(::strToInt<int>("one"), std::runtime_error, "converting 'one' to integer failed - not an integer");
236
+
ASSERT_THROW_EQUALS(::strToInt<unsignedint>("1ms"), std::runtime_error, "converting '1ms' to integer failed - not an integer");
237
+
ASSERT_THROW_EQUALS(::strToInt<unsignedint>("1.0"), std::runtime_error, "converting '1.0' to integer failed - not an integer");
238
+
ASSERT_THROW_EQUALS(::strToInt<unsignedint>("one"), std::runtime_error, "converting 'one' to integer failed - not an integer");
239
+
ASSERT_THROW_EQUALS(::strToInt<int>(std::to_string(static_cast<int64_t>(std::numeric_limits<int>::max()) + 1)), std::runtime_error, "converting '2147483648' to integer failed - out of range (limits)");
240
+
ASSERT_THROW_EQUALS(::strToInt<int>(std::to_string(static_cast<int64_t>(std::numeric_limits<int>::min()) - 1)), std::runtime_error, "converting '-2147483649' to integer failed - out of range (limits)");
241
+
ASSERT_THROW_EQUALS(::strToInt<int8_t>(std::to_string(static_cast<int64_t>(std::numeric_limits<int8_t>::max()) + 1)), std::runtime_error, "converting '128' to integer failed - out of range (limits)");
242
+
ASSERT_THROW_EQUALS(::strToInt<int8_t>(std::to_string(static_cast<int64_t>(std::numeric_limits<int8_t>::min()) - 1)), std::runtime_error, "converting '-129' to integer failed - out of range (limits)");
243
+
ASSERT_THROW_EQUALS(::strToInt<unsignedint>(std::to_string(static_cast<uint64_t>(std::numeric_limits<unsignedint>::max()) + 1)), std::runtime_error, "converting '4294967296' to integer failed - out of range (limits)");
244
+
ASSERT_THROW_EQUALS(::strToInt<int>("9223372036854775808"), std::runtime_error, "converting '9223372036854775808' to integer failed - out of range (stoll)"); // LLONG_MAX + 1
245
+
ASSERT_THROW_EQUALS(::strToInt<std::size_t>("18446744073709551616"), std::runtime_error, "converting '18446744073709551616' to integer failed - out of range (stoull)"); // ULLONG_MAX + 1
0 commit comments