Skip to content

Commit

Permalink
fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
pkhry committed Dec 5, 2024
1 parent 377981c commit a23571b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ mod tests {
fn filter_non_cfg_attributes() {
let cfg_std: Attribute = parse_quote!(#[cfg(feature = "std")]);
let cfg_benchmarks: Attribute = parse_quote!(#[cfg(feature = "runtime-benchmarks")]);
let allow: Attribute = parse_quote!(#[allow(non_camel_case_types)]);

let attrs = vec![
cfg_std.clone(),
Expand All @@ -893,9 +894,10 @@ mod tests {
];

let filtered = filter_cfg_and_allow_attrs(&attrs);
assert_eq!(filtered.len(), 2);
assert_eq!(filtered.len(), 3);
assert_eq!(cfg_std, filtered[0]);
assert_eq!(cfg_benchmarks, filtered[1]);
assert_eq!(allow, filtered[2]);
}

#[test]
Expand Down

0 comments on commit a23571b

Please sign in to comment.