use super::*;
#[test]
fn test_edge_case_hangs_behavior() {
let result = EdgeCaseResult {
name: "Hang simulation".to_string(),
passed: false,
expected: EdgeCaseBehavior::Normal,
actual: EdgeCaseBehavior::Hangs,
error: Some("Operation timed out".to_string()),
duration: Duration::from_secs(30),
};
assert!(!result.actual.is_acceptable());
assert_eq!(result.actual.description(), "Hangs/loops (UNACCEPTABLE)");
}
#[test]
fn test_empty_handling_error_path() {
let predict =
|_input: &[f32]| -> Result<Vec<f32>, String> { Err("Empty not supported".to_string()) };
let result = test_empty_handling(predict);
assert!(result.passed); assert_eq!(result.actual, EdgeCaseBehavior::GracefulError);
}
#[test]
fn test_zero_handling_error_path() {
let predict =
|_input: &[f32]| -> Result<Vec<f32>, String> { Err("Zero vector rejected".to_string()) };
let result = test_zero_handling(predict);
assert!(result.passed); assert_eq!(result.actual, EdgeCaseBehavior::GracefulError);
}
#[test]
fn test_numerical_precision_error_field() {
let result = numerical::test_precision_loss();
assert!(result.error.is_none());
}