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

Function draw_sphere_fails_on_wrong_input

src/surface_geometry.rs:550–559  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548
549 #[test]
550 fn draw_sphere_fails_on_wrong_input() {
551 let mut surf = Surface::new();
552 let res = surf.draw_sphere(&[0.0, 0.0], 1.0, 2, 2);
553 assert_eq!(res.err(), Some("c.len() must be equal to 3"));
554
555 let res = surf.draw_sphere(&[0.0, 0.0, 0.0], 1.0, 1, 2);
556 assert_eq!(res.err(), Some("n_alpha and n_theta must be ≥ 2"));
557 let res = surf.draw_sphere(&[0.0, 0.0, 0.0], 1.0, 2, 1);
558 assert_eq!(res.err(), Some("n_alpha and n_theta must be ≥ 2"));
559 }
560
561 #[test]
562 fn draw_sphere_works() {

Callers

nothing calls this directly

Calls 1

draw_sphereMethod · 0.80

Tested by

no test coverage detected