()
| 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() { |
nothing calls this directly
no test coverage detected