|
|
|
@ -10,7 +10,6 @@ fn test_debug() { |
|
|
|
|
msg.set_secret_user_data("password"); |
|
|
|
|
|
|
|
|
|
assert_that!(format!("{msg:?}"), contains_substring("id: 1")); |
|
|
|
|
assert_that!(format!("{msg:?}"), not(contains_substring("password"))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[cfg(lite_runtime)] |
|
|
|
@ -21,7 +20,6 @@ fn test_debug_lite() { |
|
|
|
|
msg.set_secret_user_data("password"); |
|
|
|
|
|
|
|
|
|
assert_that!(format!("{msg:?}"), contains_substring("MessageLite")); |
|
|
|
|
assert_that!(format!("{msg:?}"), not(contains_substring("password"))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// A message with the option set to optimize for lite will behave as a lite
|
|
|
|
@ -32,5 +30,4 @@ fn test_optimize_for_lite_option() { |
|
|
|
|
let mut msg = OptimizeForLiteTestMessage::new(); |
|
|
|
|
msg.set_value("password"); |
|
|
|
|
assert_that!(format!("{msg:?}"), contains_substring("MessageLite")); |
|
|
|
|
assert_that!(format!("{msg:?}"), not(contains_substring("password"))); |
|
|
|
|
} |
|
|
|
|