| 857 | |
| 858 | #[test] |
| 859 | fn test_llm_cost_record_clone() { |
| 860 | let record = LlmCostRecord { |
| 861 | model: "gpt-4o".to_string(), |
| 862 | provider: "openai".to_string(), |
| 863 | prompt_tokens: 100, |
| 864 | completion_tokens: 50, |
| 865 | total_tokens: 150, |
| 866 | cost_usd: Some(0.001), |
| 867 | timestamp: chrono::Utc::now(), |
| 868 | session_id: Some("sess-xyz".to_string()), |
| 869 | }; |
| 870 | let cloned = record.clone(); |
| 871 | assert_eq!(cloned.model, "gpt-4o"); |
| 872 | assert_eq!(cloned.provider, "openai"); |
| 873 | assert_eq!(cloned.prompt_tokens, 100); |
| 874 | } |
| 875 | |
| 876 | #[test] |
| 877 | fn test_timed_span_new() { |