updated build system
This commit is contained in:
@@ -37,7 +37,11 @@ TEST(utils_error, check_default_exception_handler) {
|
||||
}
|
||||
|
||||
TEST(utils_error, can_override_exception_handler) {
|
||||
struct my_exc_handler : public utils::error::i_exception_handler {
|
||||
struct my_exc_handler final : public utils::error::i_exception_handler {
|
||||
MOCK_METHOD(void, handle_error,
|
||||
(std::string_view function_name, std::string_view msg),
|
||||
(const, override));
|
||||
|
||||
MOCK_METHOD(void, handle_exception, (std::string_view function_name),
|
||||
(const, override));
|
||||
|
||||
@@ -49,6 +53,9 @@ TEST(utils_error, can_override_exception_handler) {
|
||||
my_exc_handler handler{};
|
||||
utils::error::set_exception_handler(&handler);
|
||||
|
||||
EXPECT_CALL(handler, handle_error("test_func", "error")).WillOnce(Return());
|
||||
utils::error::handle_error("test_func", "error");
|
||||
|
||||
EXPECT_CALL(handler, handle_exception("test_func")).WillOnce(Return());
|
||||
utils::error::handle_exception("test_func");
|
||||
|
||||
|
@@ -26,7 +26,7 @@ static constexpr const auto file_type_count{1U};
|
||||
}
|
||||
|
||||
namespace repertory {
|
||||
TEST(utils_file, can_create_file) {
|
||||
TEST(utils_file, can_create_and_remove_file) {
|
||||
for (auto idx = 0U; idx < file_type_count; ++idx) {
|
||||
auto path = test::generate_test_file_name("utils_file");
|
||||
EXPECT_FALSE(utils::file::file(path).exists() ||
|
||||
@@ -37,6 +37,12 @@ TEST(utils_file, can_create_file) {
|
||||
EXPECT_TRUE(*file);
|
||||
|
||||
EXPECT_TRUE(utils::file::file(path).exists());
|
||||
EXPECT_TRUE(file->exists());
|
||||
|
||||
EXPECT_TRUE(file->remove());
|
||||
|
||||
EXPECT_FALSE(utils::file::file(path).exists());
|
||||
EXPECT_FALSE(file->exists());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user