File: test_force_utc_3.rs

package info (click to toggle)
rust-flexi-logger 0.29.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,084 kB
  • sloc: makefile: 2
file content (17 lines) | stat: -rw-r--r-- 456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod test_utils;

use flexi_logger::{DeferredNow, Logger};
use log::*;

#[test]
#[should_panic(expected = "we arrived here, everything OK")]
fn test_force_utc_3() {
    DeferredNow::force_utc();
    let _ = Logger::try_with_str("info")
        .unwrap()
        .start()
        .unwrap_or_else(|e| panic!("Logger initialization failed with {e}"));
    DeferredNow::force_utc();
    info!("must be printed");
    panic!("we arrived here, everything OK");
}