Documents: time the drawn-lookup test with web_time
The component's check bans std Instant; the R4.10 test used it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2b8bd9fcf3
commit
e07fd34fa3
1 file changed
+1
-1
@@ -378,7 +378,7 @@ mod tests {
|
|||||||
fn a_long_paragraph_reads_back_in_one_pass() {
|
fn a_long_paragraph_reads_back_in_one_pass() {
|
||||||
let source = "x".repeat(40_000);
|
let source = "x".repeat(40_000);
|
||||||
let inline = first(&source);
|
let inline = first(&source);
|
||||||
let started = std::time::Instant::now();
|
let started = web_time::Instant::now();
|
||||||
assert_eq!(inline.drawn_at(&source, 5), Some(5));
|
assert_eq!(inline.drawn_at(&source, 5), Some(5));
|
||||||
let took = started.elapsed();
|
let took = started.elapsed();
|
||||||
assert!(took.as_millis() < 500, "took {took:?}");
|
assert!(took.as_millis() < 500, "took {took:?}");
|
||||||
|
|||||||
Reference in new issue
Block a user