#[derive(Ord, PartialOrd, Eq, PartialEq, Debug, Clone, clap::ValueEnum, Copy)]
pub enum Scope {
Global,
Local,
}
impl Scope {
#[must_use]
pub fn is_global(&self) -> bool {
&Self::Global == self
}
}
#[cfg(test)]
mod tests {
use super::Scope;
#[test]
fn global_scope_is_global() {
assert!(
Scope::Global.is_global(),
"Expected the Global scope to report as global"
);
}
#[test]
fn local_scope_is_not_global() {
assert!(
!Scope::Local.is_global(),
"Expected the Local scope to not report as global"
);
}
}