mirror of
https://gitee.com/openharmony/third_party_rust_log
synced 2024-11-23 07:40:08 +00:00
add a different prop type to macro tests
This commit is contained in:
parent
77667f5436
commit
13b9dbcef1
@ -118,39 +118,39 @@ fn expr() {
|
|||||||
#[cfg(feature = "kv_unstable")]
|
#[cfg(feature = "kv_unstable")]
|
||||||
fn kv_no_args() {
|
fn kv_no_args() {
|
||||||
for lvl in log::Level::iter() {
|
for lvl in log::Level::iter() {
|
||||||
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori"; "hello");
|
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello");
|
||||||
|
|
||||||
log!(lvl; cat_1 = "chashu", cat_2 = "nori"; "hello");
|
log!(lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello");
|
||||||
}
|
}
|
||||||
|
|
||||||
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori"; "hello");
|
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello");
|
||||||
all_log_macros!(cat_1 = "chashu", cat_2 = "nori"; "hello");
|
all_log_macros!(cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "kv_unstable")]
|
#[cfg(feature = "kv_unstable")]
|
||||||
fn kv_anonymous_args() {
|
fn kv_anonymous_args() {
|
||||||
for lvl in log::Level::iter() {
|
for lvl in log::Level::iter() {
|
||||||
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori"; "hello {}", "world");
|
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {}", "world");
|
||||||
|
|
||||||
log!(lvl; cat_1 = "chashu", cat_2 = "nori"; "hello {}", "world");
|
log!(lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {}", "world");
|
||||||
}
|
}
|
||||||
|
|
||||||
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori"; "hello {}", "world");
|
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {}", "world");
|
||||||
all_log_macros!(cat_1 = "chashu", cat_2 = "nori"; "hello {}", "world");
|
all_log_macros!(cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {}", "world");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "kv_unstable")]
|
#[cfg(feature = "kv_unstable")]
|
||||||
fn kv_named_args() {
|
fn kv_named_args() {
|
||||||
for lvl in log::Level::iter() {
|
for lvl in log::Level::iter() {
|
||||||
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori"; "hello {world}", world = "world");
|
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}", world = "world");
|
||||||
|
|
||||||
log!(lvl; cat_1 = "chashu", cat_2 = "nori"; "hello {world}", world = "world");
|
log!(lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}", world = "world");
|
||||||
}
|
}
|
||||||
|
|
||||||
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori"; "hello {world}", world = "world");
|
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}", world = "world");
|
||||||
all_log_macros!(cat_1 = "chashu", cat_2 = "nori"; "hello {world}", world = "world");
|
all_log_macros!(cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}", world = "world");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -167,7 +167,7 @@ fn kv_expr_context() {
|
|||||||
#[cfg(feature = "kv_unstable")]
|
#[cfg(feature = "kv_unstable")]
|
||||||
fn kv_shadow_target() {
|
fn kv_shadow_target() {
|
||||||
all_log_macros!(target = "kv_target"; "hello {}", "world");
|
all_log_macros!(target = "kv_target"; "hello {}", "world");
|
||||||
all_log_macros!(target = "kv_target", cat_1 = "chashu", cat_2 = "nori"; "hello {}", "world");
|
all_log_macros!(target = "kv_target", cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {}", "world");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustversion::since(1.58)]
|
#[rustversion::since(1.58)]
|
||||||
@ -208,12 +208,12 @@ mod implicit_args {
|
|||||||
let world = "world";
|
let world = "world";
|
||||||
|
|
||||||
for lvl in log::Level::iter() {
|
for lvl in log::Level::iter() {
|
||||||
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori"; "hello {world}");
|
log!(target = "my_target", lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
|
||||||
|
|
||||||
log!(lvl; cat_1 = "chashu", cat_2 = "nori"; "hello {world}");
|
log!(lvl; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
|
||||||
}
|
}
|
||||||
|
|
||||||
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori"; "hello {world}");
|
all_log_macros!(target = "my_target"; cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
|
||||||
all_log_macros!(cat_1 = "chashu", cat_2 = "nori"; "hello {world}");
|
all_log_macros!(cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user