opendp 0.14.2-dev.20260401.2

A library of differential privacy algorithms for the statistical analysis of sensitive private data.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;

#[test]
fn test_error_from_conversion_error() {
    let e: Error = ConversionError::OutOfBounds.into();
    assert_eq!(e.variant, ErrorVariant::FailedCast);
}

#[cfg(feature = "polars")]
#[test]
fn test_error_from_polars_error() {
    let e: Error = PolarsError::ColumnNotFound("A".into()).into();
    assert_eq!(e.variant, ErrorVariant::FailedFunction);
    assert_eq!(
        e.message,
        Some("ColumnNotFound(ErrString(\"A\"))".to_string())
    );
}