diff options
Diffstat (limited to 'tests/src/tests.rs')
| -rw-r--r-- | tests/src/tests.rs | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 42663e6c..0a936a8d 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -2,13 +2,12 @@ use std::cell::{RefCell, RefMut}; use std::collections::{HashMap, HashSet}; -use std::env; use std::ffi::OsStr; use std::fmt::{self, Display, Formatter, Write as _}; -use std::fs; use std::io::{self, Write}; use std::ops::Range; use std::path::{Path, PathBuf}; +use std::{env, fs}; use clap::Parser; use comemo::{Prehashed, Track}; @@ -17,20 +16,20 @@ use oxipng::{InFile, Options, OutFile}; use rayon::iter::{ParallelBridge, ParallelIterator}; use std::cell::OnceCell; use tiny_skia as sk; -use unscanny::Scanner; -use walkdir::WalkDir; - use typst::diag::{bail, FileError, FileResult, Severity, StrResult}; -use typst::doc::{Document, Frame, FrameItem, Meta}; -use typst::eval::{ - eco_format, func, Bytes, Datetime, Library, NoneValue, Repr, Smart, Tracer, Value, +use typst::eval::Tracer; +use typst::foundations::{ + eco_format, func, Bytes, Datetime, NoneValue, Repr, Smart, Value, }; -use typst::font::{Font, FontBook}; -use typst::geom::{Abs, Color, Transform}; +use typst::introspection::Meta; +use typst::layout::{Abs, Frame, FrameItem, Margin, PageElem, Transform}; +use typst::model::Document; use typst::syntax::{FileId, PackageVersion, Source, SyntaxNode, VirtualPath}; -use typst::{World, WorldExt}; -use typst_library::layout::{Margin, PageElem}; -use typst_library::text::{TextElem, TextSize}; +use typst::text::{Font, FontBook, TextElem, TextSize}; +use typst::visualize::Color; +use typst::{Library, World, WorldExt}; +use unscanny::Scanner; +use walkdir::WalkDir; const TYP_DIR: &str = "typ"; const REF_DIR: &str = "ref"; @@ -183,11 +182,10 @@ fn library() -> Library { NoneValue } - let mut lib = typst_library::build(); - // Set page width to 120pt with 10pt margins, so that the inner page is // exactly 100pt wide. Page height is unbounded and font size is 10pt so // that it multiplies to nice round numbers. + let mut lib = Library::build(); lib.styles .set(PageElem::set_width(Smart::Custom(Abs::pt(120.0).into()))); lib.styles.set(PageElem::set_height(Smart::Auto)); |
