mirror of
https://github.com/fmtlib/fmt.git
synced 2024-09-03 13:39:15 +00:00
Fix tests
This commit is contained in:
parent
3610f34c70
commit
7258d1b8f3
@ -268,10 +268,10 @@ TEST(ExpectTest, EXPECT_SYSTEM_ERROR) {
|
||||
EXPECT_NONFATAL_FAILURE(
|
||||
EXPECT_SYSTEM_ERROR(throw_exception(), EDOM, "test"),
|
||||
"Expected: throw_exception() throws an exception of "
|
||||
"type fmt::SystemError.\n Actual: it throws a different type.");
|
||||
"type fmt::system_error.\n Actual: it throws a different type.");
|
||||
EXPECT_NONFATAL_FAILURE(
|
||||
EXPECT_SYSTEM_ERROR(do_nothing(), EDOM, "test"),
|
||||
"Expected: do_nothing() throws an exception of type fmt::SystemError.\n"
|
||||
"Expected: do_nothing() throws an exception of type fmt::system_error.\n"
|
||||
" Actual: it throws nothing.");
|
||||
EXPECT_NONFATAL_FAILURE(
|
||||
EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, "other"),
|
||||
|
@ -670,10 +670,10 @@ void check_utf_conversion_error(
|
||||
fmt::basic_string_view<Char> str = fmt::basic_string_view<Char>(0, 0)) {
|
||||
fmt::memory_buffer out;
|
||||
fmt::internal::format_windows_error(out, ERROR_INVALID_PARAMETER, message);
|
||||
fmt::SystemError error(0, "");
|
||||
fmt::system_error error(0, "");
|
||||
try {
|
||||
(Converter)(str);
|
||||
} catch (const fmt::SystemError &e) {
|
||||
} catch (const fmt::system_error &e) {
|
||||
error = e;
|
||||
}
|
||||
EXPECT_EQ(ERROR_INVALID_PARAMETER, error.error_code());
|
||||
@ -788,7 +788,7 @@ TEST(UtilTest, FormatLongWindowsError) {
|
||||
}
|
||||
|
||||
TEST(UtilTest, WindowsError) {
|
||||
check_throw_error<fmt::WindowsError>(
|
||||
check_throw_error<fmt::windows_error>(
|
||||
ERROR_FILE_EXISTS, fmt::internal::format_windows_error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user