MCPcopy Create free account
hub / github.com/alceal/plotlars / test_builder_chaining

Function test_builder_chaining

crates/plotlars-core/src/components/axis.rs:389–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387
388 #[test]
389 fn test_builder_chaining() {
390 let a = Axis::new()
391 .show_axis(true)
392 .show_grid(false)
393 .show_line(true)
394 .value_range(1.0, 50.0)
395 .tick_labels(vec!["x", "y", "z"]);
396 assert_eq!(a.show_axis, Some(true));
397 assert_eq!(a.show_grid, Some(false));
398 assert_eq!(a.show_line, Some(true));
399 assert_eq!(a.value_range.unwrap().len(), 2);
400 assert_eq!(a.tick_labels.unwrap().len(), 3);
401 }
402}
403
404/// Enumeration representing the position of the axis.

Callers

nothing calls this directly

Calls 5

value_rangeMethod · 0.80
show_lineMethod · 0.80
show_gridMethod · 0.80
show_axisMethod · 0.80
tick_labelsMethod · 0.45

Tested by

no test coverage detected