()
| 941 | |
| 942 | #[test] |
| 943 | fn test_credit_stats_add() { |
| 944 | let mut stats = CreditStats::new(); |
| 945 | |
| 946 | let human = Credit::human("alice", None::<String>, test_hash(), test_timestamp()); |
| 947 | stats.add(&human); |
| 948 | stats.add(&human); |
| 949 | |
| 950 | let ai = Credit::ai_generated( |
| 951 | "bob", |
| 952 | None::<String>, |
| 953 | AIVendor::Anthropic, |
| 954 | "claude", |
| 955 | test_hash(), |
| 956 | test_timestamp(), |
| 957 | None, |
| 958 | ); |
| 959 | stats.add(&ai); |
| 960 | |
| 961 | assert_eq!(stats.total_lines, 3); |
| 962 | assert_eq!(stats.human_lines, 2); |
| 963 | assert_eq!(stats.ai_generated_lines, 1); |
| 964 | } |
| 965 | |
| 966 | #[test] |
| 967 | fn test_credit_stats_percentages() { |
nothing calls this directly
no test coverage detected