Skip to content

Commit 53291ea

Browse files
add unit test
1 parent 4782037 commit 53291ea

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

core/src/target_os_check.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,16 @@ mod test {
311311

312312
assert!(accept_target_os(&test_struct.attrs, &["android".into()]))
313313
}
314+
315+
#[test]
316+
fn test_not_scope_reverse() {
317+
init_log();
318+
319+
let test_struct: ItemStruct = parse_quote! {
320+
#[cfg(all(target_os = "android", not(feature = "my-feature")))]
321+
pub struct Test;
322+
};
323+
324+
assert!(accept_target_os(&test_struct.attrs, &["android".into()]))
325+
}
314326
}

0 commit comments

Comments
 (0)