internal/utils: Errors now have names
diff --git a/test/internal/utils.cpp b/test/internal/utils.cpp
index 2a347ca..403964c 100644
--- a/test/internal/utils.cpp
+++ b/test/internal/utils.cpp
@@ -12,25 +12,27 @@
TEST(UtilsTest, PerformCallbackSuccess)
{
- EXPECT_EQ(0, performCallback([]() {}));
+ EXPECT_EQ(0, performCallback(nullptr, []() {}));
}
TEST(UtilsTest, SetPrepareSystemError)
{
- EXPECT_EQ(-EBUSY, performCallback([]() {
+ EXPECT_EQ(-EBUSY, performCallback("system_error", []() {
throw std::system_error(EBUSY, std::generic_category());
}));
}
TEST(UtilsTest, SetPrepareException)
{
- EXPECT_EQ(-ENOSYS,
- performCallback([]() { throw std::runtime_error("Exception"); }));
+ EXPECT_EQ(-ENOSYS, performCallback("runtime_error", []() {
+ throw std::runtime_error("Exception");
+ }));
}
TEST(UtilsTest, SetPrepareUnknownException)
{
- EXPECT_EQ(-ENOSYS, performCallback([]() { throw static_cast<int>(1); }));
+ EXPECT_EQ(-ENOSYS,
+ performCallback("unknown", []() { throw static_cast<int>(1); }));
}
} // namespace