shithub: aubio

Download patch

ref: fead41ac21ffd37dd9eac4f5f4e1a301f9d4d1e1
parent: 32da451b50f1956adace38413fa4e1360ea65e44
author: Paul Brossier <piem@piem.org>
date: Sun Jan 8 10:19:02 EST 2017

tests/src/utils/test-log.c: improve messages

--- a/tests/src/utils/test-log.c
+++ b/tests/src/utils/test-log.c
@@ -9,7 +9,7 @@
  * aubio debug messages on stdout instead of stderr */
 void logging(int level, const char_t *message, void *data) {
   FILE *out;
-  fprintf(stdout, "using custom logging function\n");
+  //fprintf(stdout, "using custom logging function\n");
   if (level == AUBIO_LOG_ERR) {
     out = stderr;
   } else {
@@ -32,29 +32,29 @@
 
   fprintf(stdout, "### testing with one custom function\n");
   aubio_log_set_function(logging, (void *)hdr);
-  AUBIO_ERR("testing recustom AUBIO_LOG_ERR\n");
-  AUBIO_INF("testing recustom AUBIO_LOG_INF\n");
-  AUBIO_WRN("testing recustom AUBIO_LOG_WRN\n");
-  AUBIO_MSG("testing recustom AUBIO_LOG_MSG\n");
-  AUBIO_DBG("testing recustom AUBIO_LOG_DBG\n");
+  AUBIO_ERR("testing custom set_function AUBIO_LOG_ERR\n");
+  AUBIO_INF("testing custom set_function AUBIO_LOG_INF\n");
+  AUBIO_WRN("testing custom set_function AUBIO_LOG_WRN\n");
+  AUBIO_MSG("testing custom set_function AUBIO_LOG_MSG\n");
+  AUBIO_DBG("testing custom set_function AUBIO_LOG_DBG\n");
 
   fprintf(stdout, "### testing resetted logging\n");
   aubio_log_reset();
-  AUBIO_ERR("testing uncustom AUBIO_LOG_ERR\n");
-  AUBIO_INF("testing uncustom AUBIO_LOG_INF\n");
-  AUBIO_WRN("testing uncustom AUBIO_LOG_WRN\n");
-  AUBIO_MSG("testing uncustom AUBIO_LOG_MSG\n");
-  AUBIO_DBG("testing uncustom AUBIO_LOG_DBG\n");
+  AUBIO_ERR("testing again normal AUBIO_LOG_ERR\n");
+  AUBIO_INF("testing again normal AUBIO_LOG_INF\n");
+  AUBIO_WRN("testing again normal AUBIO_LOG_WRN\n");
+  AUBIO_MSG("testing again normal AUBIO_LOG_MSG\n");
+  AUBIO_DBG("testing again normal AUBIO_LOG_DBG\n");
 
   fprintf(stdout, "### testing per level customization\n");
   aubio_log_set_level_function(AUBIO_LOG_ERR, logging, (void *)hdr2);
   aubio_log_set_level_function(AUBIO_LOG_WRN, logging, NULL);
   aubio_log_set_level_function(AUBIO_LOG_MSG, logging, (void *)hdr);
-  AUBIO_ERR("testing custom AUBIO_LOG_ERR\n");
-  AUBIO_INF("testing custom AUBIO_LOG_INF\n");
-  AUBIO_WRN("testing custom AUBIO_LOG_WRN with data=NULL\n");
-  AUBIO_MSG("testing custom AUBIO_LOG_MSG\n");
-  AUBIO_DBG("testing uncustomized AUBIO_LOG_DBG\n");
+  AUBIO_ERR("testing custom set_level_function AUBIO_LOG_ERR\n");
+  AUBIO_INF("testing again normal AUBIO_LOG_INF\n");
+  AUBIO_WRN("testing custom set_level_function AUBIO_LOG_WRN with data=NULL\n");
+  AUBIO_MSG("testing custom set_level_function AUBIO_LOG_MSG\n");
+  AUBIO_DBG("testing again normal AUBIO_LOG_DBG\n");
 
   return 0;
 }