MCPcopy Create free account
hub / github.com/RustCrypto/utils / test_derive

Function test_derive

zeroize_derive/src/lib.rs:430–437  ·  view source on GitHub ↗
(
        f: impl Fn(DeriveInput) -> TokenStream,
        input: TokenStream,
        expected_output: TokenStream,
    )

Source from the content-addressed store, hash-verified

428
429 #[track_caller]
430 fn test_derive(
431 f: impl Fn(DeriveInput) -> TokenStream,
432 input: TokenStream,
433 expected_output: TokenStream,
434 ) {
435 let output = f(syn::parse2(input).unwrap());
436 assert_eq!(format!("{output}"), format!("{expected_output}"));
437 }
438
439 #[track_caller]
440 fn parse_zeroize_test(unparsed: &str) -> TokenStream {

Callers 5

zeroize_without_dropFunction · 0.85
zeroize_with_dropFunction · 0.85
zeroize_with_skipFunction · 0.85
zeroize_with_boundFunction · 0.85
zeroize_only_dropFunction · 0.85

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected