rustsynth 0.7.0

Safe VapourSynth wrapper
Documentation
#[cfg(test)]
mod tests {
    use crate::format::{ColorFamily, PresetVideoFormat, SampleType};

    #[test]
    fn test_preset_format_values() {
        // Test some key preset format values
        assert_eq!(PresetVideoFormat::None as i32, 0);
        assert_ne!(PresetVideoFormat::Gray8 as i32, 0);
        assert_ne!(PresetVideoFormat::YUV420P8 as i32, 0);
        assert_ne!(PresetVideoFormat::RGB24 as i32, 0);
    }

    #[test]
    fn test_color_family_enum() {
        // Test ColorFamily enum values
        assert_eq!(ColorFamily::Undefined as i32, 0);
        assert_eq!(ColorFamily::Gray as i32, 1);
        assert_eq!(ColorFamily::RGB as i32, 2);
        assert_eq!(ColorFamily::YUV as i32, 3);
    }

    #[test]
    fn test_sample_type_enum() {
        // Test SampleType enum values
        assert_eq!(SampleType::Integer as i32, 0);
        assert_eq!(SampleType::Float as i32, 1);
    }

    #[test]
    fn test_format_id_uniqueness() {
        // Different formats should have different IDs
        assert_ne!(
            PresetVideoFormat::Gray8 as i32,
            PresetVideoFormat::Gray16 as i32
        );
        assert_ne!(
            PresetVideoFormat::Gray8 as i32,
            PresetVideoFormat::YUV420P8 as i32
        );
        assert_ne!(
            PresetVideoFormat::RGB24 as i32,
            PresetVideoFormat::YUV420P8 as i32
        );

        // Float vs Integer formats should be different
        assert_ne!(
            PresetVideoFormat::GrayS as i32,
            PresetVideoFormat::Gray32 as i32
        );
    }

    #[test]
    fn test_subsampling_differences() {
        // Different YUV subsampling should give different IDs
        assert_ne!(
            PresetVideoFormat::YUV420P8 as i32,
            PresetVideoFormat::YUV422P8 as i32
        );
        assert_ne!(
            PresetVideoFormat::YUV422P8 as i32,
            PresetVideoFormat::YUV444P8 as i32
        );
        assert_ne!(
            PresetVideoFormat::YUV420P8 as i32,
            PresetVideoFormat::YUV444P8 as i32
        );
    }
}