std_detect testing improvements
* Fix riscv testing. Previously the mod tests; would be looking for src/detect/os/tests.rs. * Replace a test with an unnamed const item. It is testing that no warnings are emitted. It doesn't contain any checks that need to run at runtime. Replacing the test allows removing the tidy:skip directive for test locations.
This commit is contained in:
@@ -131,14 +131,13 @@ macro_rules! features {
|
||||
};
|
||||
}
|
||||
|
||||
#[test] //tidy:skip
|
||||
#[deny(unexpected_cfgs)]
|
||||
#[deny(unfulfilled_lint_expectations)]
|
||||
fn unexpected_cfgs() {
|
||||
const _: () = {
|
||||
$(
|
||||
check_cfg_feature!($feature, $feature_lit $(, without cfg check: $feature_cfg_check)? $(: $($target_feature_lit),*)?);
|
||||
)*
|
||||
}
|
||||
};
|
||||
|
||||
/// Each variant denotes a position in a bitset for a particular feature.
|
||||
///
|
||||
|
||||
@@ -135,4 +135,5 @@ pub(crate) fn imply_features(mut value: cache::Initializer) -> cache::Initialize
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "riscv/tests.rs"]
|
||||
mod tests;
|
||||
|
||||
Reference in New Issue
Block a user