()
| 555 | |
| 556 | #[test] |
| 557 | fn test_context_item_relevance_clamping() { |
| 558 | let item1 = ContextItem::new("id", ContextType::Resource, "").with_relevance(1.5); |
| 559 | assert!((item1.relevance - 1.0).abs() < f32::EPSILON); |
| 560 | |
| 561 | let item2 = ContextItem::new("id", ContextType::Resource, "").with_relevance(-0.5); |
| 562 | assert!(item2.relevance.abs() < f32::EPSILON); |
| 563 | } |
| 564 | |
| 565 | #[test] |
| 566 | fn test_context_item_to_xml_without_source() { |
nothing calls this directly
no test coverage detected