mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-11 16:30:16 -06:00
chore: replace glob imports in test modules with explicit names (Sonar S2208)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
8299d26400
commit
8dc6717ff2
@@ -3,7 +3,7 @@
|
||||
//! These helpers write real files, so they live in their own `_tests.rs` file: the
|
||||
//! file-system guard in `tests_file_guard.rs` checks `src` files but exempts test ones.
|
||||
|
||||
use super::*;
|
||||
use super::{Arc, AssetId, ItemId, Session, base64_encode, json};
|
||||
|
||||
pub(crate) fn tiff_eps() -> Vec<u8> {
|
||||
let mut tiff = b"II".to_vec();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use designcraft_tools::{Mods, PointerEvent, PointerKind, ToolKey};
|
||||
use serde_json::json;
|
||||
|
||||
use super::*;
|
||||
use super::{Arc, ViewInfo};
|
||||
|
||||
fn session() -> Session {
|
||||
let mut s = Session::new();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use serde_json::json;
|
||||
|
||||
use super::*;
|
||||
use super::doc;
|
||||
|
||||
fn session_with_frame() -> (Session, u64, u64) {
|
||||
let mut s = Session::new();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use super::*;
|
||||
use super::{Arc, DOCUMENT_FONTS_FOLDER, FALLBACK_FAMILY, FontDb, FontSource, MAX_DOCUMENT_FONT_BYTES, MAX_DOCUMENT_FONT_FILES};
|
||||
use crate::testing::{font_with, font_with_names, font_with_wws, with_fs_type};
|
||||
|
||||
/// An empty temporary folder unique to `name` and this process.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! CJK fallback follows the character's language (and the script where it is unambiguous).
|
||||
|
||||
use super::*;
|
||||
use super::FontDb;
|
||||
use crate::testing::font_with;
|
||||
|
||||
const HAN: char = '直';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
use skrifa::raw::TableProvider;
|
||||
|
||||
use super::*;
|
||||
use super::{Arc, FontBytes, FontDb, FontFace, FontSource, GlyphId, LocationRef, Size, make_face};
|
||||
use crate::testing::{font_mapping, font_with, with_base, with_code_pages, with_table_len, with_table_u16, with_vmtx, with_vorg};
|
||||
use crate::{ShapeContext, feature, shape_vertical, shape_with_context};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use designcraft_doc::{Align, Document, ParaAttrs, ParaFormat, SpreadRef, TextDir
|
||||
use designcraft_geom::Rect;
|
||||
|
||||
use crate::tests::extract_text;
|
||||
use crate::*;
|
||||
use crate::{PdfOptions, export_pdf};
|
||||
|
||||
const HEBREW: &str = "DC Test PDF Hebrew";
|
||||
const ARABIC: &str = "DC Test PDF Arabic";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use egui::{Event, Modifiers, PointerButton};
|
||||
use egui_kittest::Harness;
|
||||
|
||||
use super::*;
|
||||
use super::{CanvasLayout, Mods, Overlay, Point, Pos2, RULER, SpreadRef, ToolKey, Xf, json, pos2, vec2};
|
||||
|
||||
fn harness(app: DesignApp) -> Harness<'static, DesignApp> {
|
||||
let mut h = Harness::builder().with_size(vec2(1440.0, 900.0)).build_ui_state(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::*;
|
||||
use super::{Layout, Node, cancel_gesture, json, valid};
|
||||
use egui::{Event, Modifiers, PointerButton, Pos2, vec2};
|
||||
use egui_kittest::{Harness, kittest::Queryable};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::*;
|
||||
use super::{CanvasLayout, Color32, Point, Pos2, Rect, View, Xf, json, render_texture, vec2};
|
||||
|
||||
fn app_with_document_object() -> DesignApp {
|
||||
let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());
|
||||
|
||||
Reference in New Issue
Block a user