diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-18 17:33:13 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-18 17:33:13 +0100 |
| commit | 61d1e1a6831113143c5d1e9f8ccf2a86f90f359a (patch) | |
| tree | 27c85e1ee876941bba558bb187885ccc4a76f87d /tests | |
| parent | e01970b20a058ab1b4ebea916f229c9b706c84e4 (diff) | |
Remove layout-cache feature
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/code/ops.typ | 3 | ||||
| -rw-r--r-- | tests/typeset.rs | 17 |
2 files changed, 6 insertions, 14 deletions
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ index 0ad35a27..53d00132 100644 --- a/tests/typ/code/ops.typ +++ b/tests/typ/code/ops.typ @@ -137,7 +137,8 @@ #test([a] == [a], true) #test([[a]] == [a], true) #test([] == [a], false) -#test(box[] == box[], false) +#test(box[] == box[], true) +#test(box[a] == box[], false) --- // Test comparison operators. diff --git a/tests/typeset.rs b/tests/typeset.rs index 98c85df9..00075166 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -1,10 +1,11 @@ use std::env; use std::ffi::OsStr; -use std::fs; +use std::fs::{self, File}; use std::ops::Range; use std::path::Path; use std::sync::Arc; +use filedescriptor::{FileDescriptor, StdioDescriptor::*}; use tiny_skia as sk; use walkdir::WalkDir; @@ -15,17 +16,10 @@ use typst::geom::{Length, RgbaColor}; use typst::library::{PageNode, TextNode}; use typst::loading::FsLoader; use typst::parse::Scanner; -use typst::source::SourceFile; +use typst::source::{SourceFile, SourceId}; use typst::syntax::Span; use typst::{Context, Vm}; -#[cfg(feature = "layout-cache")] -use { - filedescriptor::{FileDescriptor, StdioDescriptor::*}, - std::fs::File, - typst::source::SourceId, -}; - const TYP_DIR: &str = "./typ"; const REF_DIR: &str = "./ref"; const PNG_DIR: &str = "./png"; @@ -277,8 +271,7 @@ fn test_part( let mut vm = Vm::new(ctx); let (frames, mut errors) = match vm.typeset(id) { Ok(mut frames) => { - #[cfg(feature = "layout-cache")] - (ok &= test_incremental(ctx, i, id, &frames)); + ok &= test_incremental(ctx, i, id, &frames); if !compare_ref { frames.clear(); @@ -474,7 +467,6 @@ fn test_reparse(src: &str, i: usize, rng: &mut LinearShift) -> bool { ok } -#[cfg(feature = "layout-cache")] fn test_incremental( ctx: &mut Context, i: usize, @@ -591,7 +583,6 @@ fn render_links( } /// Disable stdout and stderr during execution of `f`. -#[cfg(feature = "layout-cache")] fn silenced<F, T>(f: F) -> T where F: FnOnce() -> T, |
