use super::*;
#[test]
fn fact_abstraction_emits_fact_predicate() {
let b = lb("big(fact { goes(me) }).");
assert!(has_pred(&b, "fact"));
assert!(has_pred(&b, "goes"));
}
#[test]
fn amount_abstraction_emits_amount_predicate() {
let b = lb("big(amount { happy(me) }).");
assert!(has_pred(&b, "amount"));
assert!(has_pred(&b, "happy"));
}
#[test]
fn concept_abstraction_emits_concept_predicate() {
let b = lb("big(concept { goes(me) }).");
assert!(has_pred(&b, "concept"));
assert!(has_pred(&b, "goes"));
}
#[test]
fn event_abstraction_emits_event_predicate() {
let b = lb("big(event { goes(me) }).");
assert!(has_pred(&b, "event"));
assert!(has_pred(&b, "goes"));
}
#[test]
fn property_slot_binds_the_description_var() {
let b = lb("big(property { beautiful(slot) }).");
let prop_var = pred_args(&b, "property").unwrap()[0].clone();
let slot_filler = role_filler(&b, "beautiful_x1").unwrap();
assert!(matches!(prop_var, LogicalTerm::Variable(_)));
assert_eq!(
prop_var, slot_filler,
"slot must bind the property description var"
);
}