Add wasm tests (#74)

This commit is contained in:
Armin Ronacher 2025-01-19 15:36:34 +01:00 committed by GitHub
parent 2b2881a375
commit 5077768172
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 92 additions and 29 deletions

View file

@ -7,7 +7,7 @@ use std::ops::{Index, Range};
use crate::algorithms::utils::{common_prefix_len, common_suffix_len, is_empty_range};
use crate::algorithms::DiffHook;
use crate::Instant;
use crate::deadline_support::{deadline_exceeded, Instant};
/// LCS diff algorithm.
///
@ -166,10 +166,8 @@ where
for i in (0..new_len).rev() {
// are we running for too long? give up on the table
if let Some(deadline) = deadline {
if Instant::now() > deadline {
return None;
}
if deadline_exceeded(deadline) {
return None;
}
for j in (0..old_len).rev() {