()
| 99 | |
| 100 | #[test] |
| 101 | fn test_token_hash_value() { |
| 102 | let t1 = Token::new(b"hello", TokenKind::Word, 0); |
| 103 | let t2 = Token::new(b"hello", TokenKind::Word, 10); |
| 104 | let t3 = Token::new(b"world", TokenKind::Word, 0); |
| 105 | |
| 106 | // Same content = same hash |
| 107 | assert_eq!(t1.hash_value(), t2.hash_value()); |
| 108 | // Different content = different hash (with high probability) |
| 109 | assert_ne!(t1.hash_value(), t3.hash_value()); |
| 110 | } |
| 111 | |
| 112 | #[test] |
| 113 | fn test_token_is_significant() { |
nothing calls this directly
no outgoing calls
no test coverage detected