ferroui-controls 0.3.0

The controls of FerroUI: the application model, top levels, the control set and automation peers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::BindingEvaluator;
use crate::test_support::{boxed_str, string_of};

#[test]
fn clear_data_context_sets_data_context_to_null() {
    let evaluator = BindingEvaluator::new();
    evaluator.evaluate(&boxed_str("foo"));
    assert_eq!(Some("foo".to_string()), evaluator.data_context().as_ref().and_then(string_of));

    evaluator.clear_data_context();
    assert!(evaluator.data_context().is_none());
}