()
| 639 | |
| 640 | #[test] |
| 641 | fn test_build_context_string_truncation() { |
| 642 | // Create enough nodes to exceed MAX_CHARS |
| 643 | let nodes: Vec<KgNode> = (0..500) |
| 644 | .map(|i| { |
| 645 | KgNode::new( |
| 646 | format!("entity:{}", i), |
| 647 | atomic_core::kg::ontology::Class::File, |
| 648 | format!("entity-{}", i), |
| 649 | "graph", |
| 650 | ) |
| 651 | .with_summary(format!("A fairly long summary for entity number {} to help fill up the buffer quickly and test truncation behaviour", i)) |
| 652 | }) |
| 653 | .collect(); |
| 654 | let context = build_context_string(&nodes, &[], "big query"); |
| 655 | assert!(context.len() <= 4000); |
| 656 | } |
| 657 | |
| 658 | #[test] |
| 659 | fn test_build_context_string_groups_by_kind() { |
nothing calls this directly
no test coverage detected