Debian Codegraph @

third_party/rust/neqo-common/tests/log.rs

raw
1 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
2 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
4 // option. This file may not be copied, modified, or distributed
5 // except according to those terms.
6
7 use neqo_common::{qdebug, qerror, qinfo, qtrace, qwarn};
8
9 #[test]
10 fn basic() {
11 qerror!("error");
12 qwarn!("warn");
13 qinfo!("info");
14 qdebug!("debug");
15 qtrace!("trace");
16 }
17
18 #[test]
19 fn args() {
20 let num = 1;
21 let obj = std::time::Instant::now();
22 qerror!("error {num} {obj:?}");
23 qwarn!("warn {num} {obj:?}");
24 qinfo!("info {num} {obj:?}");
25 qdebug!("debug {num} {obj:?}");
26 qtrace!("trace {num} {obj:?}");
27 }