diff options
| author | Martin Haug <mhaug@live.de> | 2023-03-12 09:58:47 +0100 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2023-03-12 09:58:47 +0100 |
| commit | 2720a44b965d29e9c3453c732e38554fdb6413bb (patch) | |
| tree | 10f888085c4b354773a5eb8cfe9aaad74564b109 /tests | |
| parent | ca6edf5283c258d8410134d678347977cb273cdd (diff) | |
| parent | 902c2ea1215ab98db7e7047ac7b8e5fc0b50c3fe (diff) | |
Merge branch 'main' into ng
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/columns.png | bin | 107086 -> 107087 bytes | |||
| -rw-r--r-- | tests/ref/layout/par-bidi.png | bin | 25285 -> 25290 bytes | |||
| -rw-r--r-- | tests/ref/layout/par-indent.png | bin | 47226 -> 47225 bytes | |||
| -rw-r--r-- | tests/src/benches.rs | 3 | ||||
| -rw-r--r-- | tests/src/tests.rs | 2 |
5 files changed, 3 insertions, 2 deletions
diff --git a/tests/ref/layout/columns.png b/tests/ref/layout/columns.png Binary files differindex 4bf76146..51fd5b2c 100644 --- a/tests/ref/layout/columns.png +++ b/tests/ref/layout/columns.png diff --git a/tests/ref/layout/par-bidi.png b/tests/ref/layout/par-bidi.png Binary files differindex 0406fbf1..8751d93e 100644 --- a/tests/ref/layout/par-bidi.png +++ b/tests/ref/layout/par-bidi.png diff --git a/tests/ref/layout/par-indent.png b/tests/ref/layout/par-indent.png Binary files differindex 7aca22c1..269c0024 100644 --- a/tests/ref/layout/par-indent.png +++ b/tests/ref/layout/par-indent.png diff --git a/tests/src/benches.rs b/tests/src/benches.rs index ea53f602..21fdbc7a 100644 --- a/tests/src/benches.rs +++ b/tests/src/benches.rs @@ -5,6 +5,7 @@ use iai::{black_box, main, Iai}; use typst::diag::{FileError, FileResult}; use typst::eval::Library; use typst::font::{Font, FontBook}; +use typst::geom::Color; use typst::syntax::{Source, SourceId}; use typst::util::Buffer; use typst::World; @@ -90,7 +91,7 @@ fn bench_compile(iai: &mut Iai) { fn bench_render(iai: &mut Iai) { let world = BenchWorld::new(); let document = typst::compile(&world, &world.source).unwrap(); - iai.run(|| typst::export::render(&document.pages[0], 1.0)) + iai.run(|| typst::export::render(&document.pages[0], 1.0, Color::WHITE)) } struct BenchWorld { diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 8a25af15..24b3431f 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -690,7 +690,7 @@ fn render(frames: &[Frame]) -> sk::Pixmap { if frame.width() > limit || frame.height() > limit { panic!("overlarge frame: {:?}", frame.size()); } - typst::export::render(frame, pixel_per_pt) + typst::export::render(frame, pixel_per_pt, Color::WHITE) }) .collect(); |
