use liveplot::data::scope::{AxisType, ScopeData, ScopeType, ValueFormat};
#[test]
fn scope_auto_x_formatter_switches_for_time_and_xy() {
let mut scope = ScopeData::default();
assert_eq!(scope.scope_type, ScopeType::TimeScope);
let t = 1_700_000_000.0_f64; let out = scope.x_axis.format_value(t, None);
assert!(out.contains(":") || out.contains("-"));
scope.scope_type = ScopeType::XYScope;
scope.x_axis.axis_type = AxisType::Value(ValueFormat::default());
scope.x_axis.name = Some("X".to_string());
let v = 1234.5678_f64;
let out2 = scope.x_axis.format_value(v, None);
assert!(!out2.contains(":") && !out2.contains("-"));
}