This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub enum FeatureStatus {
|
pub enum FeatureStatus {
|
||||||
|
Implemented,
|
||||||
Modeled,
|
Modeled,
|
||||||
UiPrototype,
|
UiPrototype,
|
||||||
Planned,
|
Planned,
|
||||||
@@ -188,6 +189,13 @@ pub fn feature_matrix() -> Vec<(&'static str, &'static str)> {
|
|||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn features_by_status(status: FeatureStatus) -> Vec<&'static FeatureSpec> {
|
||||||
|
TABBY_FEATURES
|
||||||
|
.iter()
|
||||||
|
.filter(|feature| feature.status == status)
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn missing_required_features<'a>(required_keys: &'a [&'a str]) -> Vec<&'a str> {
|
pub fn missing_required_features<'a>(required_keys: &'a [&'a str]) -> Vec<&'a str> {
|
||||||
required_keys
|
required_keys
|
||||||
.iter()
|
.iter()
|
||||||
@@ -262,4 +270,14 @@ mod tests {
|
|||||||
"scaffold should not imply every Tabby feature is complete"
|
"scaffold should not imply every Tabby feature is complete"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn status_queries_distinguish_implemented_from_modeled() {
|
||||||
|
assert!(features_by_status(FeatureStatus::Implemented).is_empty());
|
||||||
|
let modeled = features_by_status(FeatureStatus::Modeled);
|
||||||
|
assert!(modeled.iter().any(|feature| feature.key == "nested-splits"));
|
||||||
|
assert!(modeled
|
||||||
|
.iter()
|
||||||
|
.all(|feature| feature.status == FeatureStatus::Modeled));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user