Home
last modified time | relevance | path

Searched refs:is_utf8_string (Results 1 – 2 of 2) sorted by relevance

/aosp_15_r20/external/rust/android-crates-io/crates/googletest/src/matchers/
Dis_encoded_string_matcher.rs51 pub fn is_utf8_string<'a, ActualT: AsRef<[u8]> + Debug + 'a, InnerMatcherT>( in is_utf8_string() function
110 verify_that!("A string".as_bytes(), is_utf8_string(eq("A string"))) in matches_string_as_byte_slice()
115 verify_that!("A string".as_bytes().to_vec(), is_utf8_string(eq("A string"))) in matches_string_as_byte_vec()
120 verify_that!("äöüÄÖÜ".as_bytes().to_vec(), is_utf8_string(eq("äöüÄÖÜ"))) in matches_string_with_utf_8_encoded_sequences()
125 verify_that!("äöüÄÖÜ".as_bytes().to_vec(), not(is_utf8_string(eq("A string")))) in does_not_match_non_equal_string()
130 verify_that!(&[192, 64, 255, 32], not(is_utf8_string(eq("A string")))) in does_not_match_non_utf_8_encoded_byte_sequence()
135 let matcher = is_utf8_string::<&[u8], _>(eq("A string")); in has_correct_description_in_matched_case()
145 let matcher = is_utf8_string::<&[u8], _>(eq("A string")); in has_correct_description_in_not_matched_case()
155 let explanation = is_utf8_string(eq("A string")).explain_match(&"A string".as_bytes()); in has_correct_explanation_in_matched_case()
165 let explanation = is_utf8_string(eq("A string")).explain_match(&&[192, 128, 0, 64]); in has_correct_explanation_when_byte_array_is_not_utf8_encoded()
[all …]
Dmod.rs74 pub use is_encoded_string_matcher::is_utf8_string;