From 706e40df2782fc23f26b371bba0229da5a0e61cd Mon Sep 17 00:00:00 2001 From: barbieri Date: Tue, 24 Jan 2012 22:15:06 +0000 Subject: [PATCH] reset log level after it's done testing. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@67516 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/tests/eina_test_log.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/eina_test_log.c b/src/tests/eina_test_log.c index 1ed65ad..e0f0363 100644 --- a/src/tests/eina_test_log.c +++ b/src/tests/eina_test_log.c @@ -101,9 +101,11 @@ _eina_test_log_safety(const Eina_Log_Domain *d, Eina_Log_Level level, const char START_TEST(eina_log_macro) { struct log_ctx ctx; + int oldlevel; fail_if(!eina_init()); + oldlevel = eina_log_level_get(); eina_log_level_set(EINA_LOG_LEVEL_DBG); eina_log_print_cb_set(_eina_test_log, &ctx); @@ -137,6 +139,7 @@ START_TEST(eina_log_macro) #undef TEST_LOG_CTX eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); + eina_log_level_set(oldlevel); eina_shutdown(); } @@ -145,10 +148,12 @@ END_TEST START_TEST(eina_log_domains_macros) { struct log_ctx ctx; + int oldlevel; fail_if(!eina_init()); /* make global log level blocker */ + oldlevel = eina_log_level_get(); eina_log_level_set(EINA_LOG_LEVEL_CRITICAL); eina_log_print_cb_set(_eina_test_log_domain, &ctx); @@ -189,6 +194,7 @@ START_TEST(eina_log_domains_macros) #undef TEST_LOG_CTX eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); + eina_log_level_set(oldlevel); eina_shutdown(); } -- 2.7.4