dep-protobuf/rust/test/cpp/debug_test.rs
Protobuf Team Bot 958dd59892 Remove the public _mut() accessors from string fields.
PiperOrigin-RevId: 615824279
2024-03-14 10:28:56 -07:00

12 lines
323 B
Rust

use debug_proto::DebugMsg;
use googletest::prelude::*;
#[test]
fn test_debug() {
let mut msg = DebugMsg::new();
msg.set_id(1);
msg.set_secret_user_data("password");
assert_that!(format!("{msg:?}"), contains_substring("id: 1"));
assert_that!(format!("{msg:?}"), not(contains_substring("password")));
}