/* Copyright (c) 2001-2018 Dovecot authors, see the included COPYING file */
/* Unit tests for failure helpers */
#include "test-lib.h"
#include "failures.h"
static int handlers_set_me;
const char *format ATTR_UNUSED,
{
}
static void test_get_set_handlers(void)
{
test_begin("get_handlers");
test_end();
test_begin("set_handlers");
i_debug("If you see this debug, something's gone wrong");
i_info("If you see this info, something's gone wrong");
i_warning("If you see this warning, something's gone wrong");
i_error("If you see this error, something's gone wrong");
//i_set_fatal_handler(&test_failures_handler);
//i_fatal("If you see this fatal, something's gone wrong");
//test_assert(handlers_set_me == LOG_TYPE_FATAL);
//i_set_fatal_handler(handlers[0]);
test_end();
}
static void test_expected(void)
{
test_begin("expected messages");
i_warning("deliberate warning - not suppressed");
test_end();
}
static void test_expected_str(void)
{
test_begin("expected strings in messages");
test_expect_error_string("be unhappy");
i_error("deliberate error - suppressed - be unhappy if you see this");
test_end();
}
void test_failures(void)
{
}