()
| 621 | |
| 622 | #[test] |
| 623 | fn test_build_context_string_truncation() { |
| 624 | // Create enough nodes to exceed MAX_CHARS |
| 625 | let nodes: Vec<KgNode> = (0..500) |
| 626 | .map(|i| { |
| 627 | KgNode::new( |
| 628 | format!("entity:{}", i), |
| 629 | "entity", |
| 630 | format!("entity-{}", i), |
| 631 | "graph", |
| 632 | ) |
| 633 | .with_summary(format!("A fairly long summary for entity number {} to help fill up the buffer quickly and test truncation behaviour", i)) |
| 634 | }) |
| 635 | .collect(); |
| 636 | let context = build_context_string(&nodes, &[], "big query"); |
| 637 | assert!(context.len() <= 4000); |
| 638 | } |
| 639 | |
| 640 | #[test] |
| 641 | fn test_build_context_string_groups_by_kind() { |
nothing calls this directly
no test coverage detected