File: log.c

package info (click to toggle)
criterion 2.3.3git1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,832 kB
  • sloc: ansic: 17,852; cpp: 795; python: 72; sh: 27; makefile: 23
file content (15 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <criterion/criterion.h>
#include <criterion/logging.h>

Test(logging, simple) {
    cr_log_info("This is an informational message. They are not displayed "
            "by default.");
    cr_log_warn("This is a warning. They indicate some possible malfunction "
            "or misconfiguration in the test.");
    cr_log_error("This is an error. They indicate serious problems and "
            "are usually shown before the test is aborted.");
}

Test(logging, format) {
    cr_log_info("Log messages are %s.", "printf-formatted strings");
}