diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-17 17:25:57 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-17 17:41:45 +0100 |
| commit | 35610a8c6a1721010b933324dacfe2c4d58761a3 (patch) | |
| tree | 2d02a53f541b7ebc48ace29dacedf534b670c6c1 /tests | |
| parent | c5e67af22bd6242366819879be84c10c4dd135be (diff) | |
Fallible layout
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 75602057..626fc113 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -275,14 +275,13 @@ fn test_part( ok &= test_reparse(ctx.sources.get(id).src(), i, rng); let mut vm = Vm::new(ctx); - let (frames, mut errors) = match vm.evaluate(id) { - Ok(module) => { + let (frames, mut errors) = match vm.typeset(id) { + Ok(mut frames) => { + let module = vm.evaluate(id).unwrap(); if debug { println!("Template: {:#?}", module.template); } - let mut frames = module.template.layout(&mut vm); - #[cfg(feature = "layout-cache")] (ok &= test_incremental(ctx, i, &module.template, &frames)); @@ -499,7 +498,7 @@ fn test_incremental( ctx.layout_cache.turnaround(); - let cached = silenced(|| template.layout(&mut Vm::new(ctx))); + let cached = silenced(|| template.layout(&mut Vm::new(ctx)).unwrap()); let total = reference.levels() - 1; let misses = ctx .layout_cache |
