()
| 678 | |
| 679 | #[test] |
| 680 | fn links_and_runs() { |
| 681 | use std::ptr; |
| 682 | unsafe { |
| 683 | assert!(liq_version() >= 40000); |
| 684 | let attr = liq_attr_create().unwrap(); |
| 685 | let mut hist = liq_histogram_create(&attr).unwrap(); |
| 686 | assert_eq!(LIQ_OK, liq_histogram_add_fixed_color(&mut hist, liq_color {r: 0, g: 0, b: 0, a: 0}, 0.)); |
| 687 | liq_histogram_add_colors(&mut hist, &attr, ptr::null(), 0, 0.); |
| 688 | |
| 689 | let mut res = MaybeUninit::uninit(); |
| 690 | |
| 691 | // this is fine, because there is 1 fixed color to generate |
| 692 | assert_eq!(LIQ_OK, liq_histogram_quantize(&mut hist, &attr, &mut res)); |
| 693 | let res = res.assume_init().unwrap(); |
| 694 | |
| 695 | liq_result_destroy(Some(res)); |
| 696 | liq_histogram_destroy(Some(hist)); |
| 697 | liq_attr_destroy(Some(attr)); |
| 698 | } |
| 699 | } |
| 700 | |
| 701 | #[test] |
| 702 | #[allow(deprecated)] |
nothing calls this directly
no test coverage detected