MCPcopy Create free account
hub / github.com/cpmech/plotpy / draw_hemisphere_fails_on_wrong_input

Function draw_hemisphere_fails_on_wrong_input

src/surface_geometry.rs:482–491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

480
481 #[test]
482 fn draw_hemisphere_fails_on_wrong_input() {
483 let mut surf = Surface::new();
484 let res = surf.draw_hemisphere(&[0.0, 0.0], 1.0, 0.0, 180.0, 2, 2, false);
485 assert_eq!(res.err(), Some("c.len() must be equal to 3"));
486
487 let res = surf.draw_hemisphere(&[0.0, 0.0, 0.0], 1.0, 0.0, 180.0, 1, 2, false);
488 assert_eq!(res.err(), Some("n_alpha and n_theta must be ≥ 2"));
489 let res = surf.draw_hemisphere(&[0.0, 0.0, 0.0], 1.0, 0.0, 180.0, 2, 1, false);
490 assert_eq!(res.err(), Some("n_alpha and n_theta must be ≥ 2"));
491 }
492
493 #[test]
494 fn draw_hemisphere_works() {

Callers

nothing calls this directly

Calls 1

draw_hemisphereMethod · 0.80

Tested by

no test coverage detected