()
| 185 | |
| 186 | #[tokio::test] |
| 187 | pub async fn test_decode_timeout() { |
| 188 | let decoder = r#" |
| 189 | function decodeUplink(input) { |
| 190 | while (true) { |
| 191 | |
| 192 | } |
| 193 | } |
| 194 | "# |
| 195 | .to_string(); |
| 196 | |
| 197 | let vars: HashMap<String, String> = HashMap::new(); |
| 198 | let out = decode(Utc::now(), 10, &vars, &decoder, &[0x01, 0x02, 0x03]).await; |
| 199 | assert!(out.is_err()); |
| 200 | } |
| 201 | |
| 202 | #[tokio::test] |
| 203 | pub async fn test_decode_error() { |