summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-03 22:38:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-03 22:38:30 +0200
commit1f8a6bef78284849372d0128ab3ea87f825142db (patch)
tree4d50a1f8040d40ff7329649c11a2fbb67a5005b2 /libavutil/log.c
parent5a18b215f7138c0bd59f27389050b0311fa4a549 (diff)
downloadffmpeg-1f8a6bef78284849372d0128ab3ea87f825142db.tar.gz
avutil/log: add code to test av_log()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 3a6ab12a26..843d2e91eb 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -375,3 +375,26 @@ void avpriv_report_missing_feature(void *avc, const char *msg, ...)
missing_feature_sample(0, avc, msg, argument_list);
va_end(argument_list);
}
+
+#ifdef TEST
+// LCOV_EXCL_START
+#include <string.h>
+
+int main(int argc, char **argv)
+{
+ int i;
+ av_log_set_level(AV_LOG_DEBUG);
+ for (use_color=0; use_color<=256; use_color = 255*use_color+1) {
+ av_log(NULL, AV_LOG_FATAL, "use_color: %d\n", use_color);
+ for (i = AV_LOG_DEBUG; i>=AV_LOG_QUIET; i-=8) {
+ av_log(NULL, i, " %d", i);
+ av_log(NULL, AV_LOG_INFO, "e ");
+ av_log(NULL, i + 256*123, "C%d", i);
+ av_log(NULL, AV_LOG_INFO, "e");
+ }
+ av_log(NULL, AV_LOG_PANIC, "\n");
+ }
+ return 0;
+}
+// LCOV_EXCL_STOP
+#endif