the_menu_family_list_now_does_not_wait_for_the_scan held the background
font scan with a named pipe named like a font. The font catalog now
skips files that are not regular files, so the scan never waited on the
pipe: it read the small test folder and could finish before the test
called installed_fonts_ready and menu_family_list_now. On a busy CI
runner the test then saw the installed fonts and failed with "before the
scan ends, only the fonts already loaded".
The test now builds its database with a test-only lister that the scan
calls before it reads the folder. The lister waits until the test drops
a channel sender after the two calls return, and gives up after 10 s so
that a list that waits for the scan fails the test instead of hanging
it. The pipe, the release thread and the Unix-only gate are removed.
hebrew_marks_stay_with_base_clusters asserts exact glyph start offsets,
which depend on the face that shapes the word. It now skips, as the
sibling font-dependent tests do, when no installed face covers shin,
lamed, vav and final mem.
hebrew_marks_stay_with_base_clusters now calls assert_source_coverage, so
glyphs that start at the four letters but leave the marks out of their
source ranges fail the test.
`presets()` leaves out a name that `preset` does not know, so the test
now compares its length with `PRESET_NAMES` and checks that list holds 15
names, in place of a fixed count of 15 resolved presets.
Panel tests that could pass on an empty list, that only checked a control was
there, or that looped over every language or preset now check the result:
- Character, Glyphs and OpenType: the underline, kashida, size, Up/Down, glyph
form and Proportional Metrics checks compare the text each setting reaches
(for example "AB" underlined, then none) instead of `all()` over the runs,
which passed when a frame had no runs.
- Actions: the built-in actions play on a selection and each makes an undo
step, instead of only looking up their command ids.
- Color Wheel: Show Out-of-Gamut Colors is checked by what the wheel and the
box draw with it on and off. The test that loaded a profile and only checked
the box was shown is removed, and two copies of the junk-parameter test are
removed (the one in tests_color_wheel_vision.rs runs with and without a
document). The error-translation tests check German and Japanese instead of
every catalog.
- History and Paragraph: the name and Mojikumi checks use a few languages
instead of every catalog, and the Numbered List presets are checked by one
style instead of every number style.
- Graphic Styles, Stroke and Swatches: the rename, profile preview and row
menu checks count what they read before checking each item.
- Image Trace: the off-thread trace test waits on the trace's own channel
through a new test-only `trace_runs::finish_all`, instead of polling with a
sleep for up to 30 seconds.
Assertions that ran all() over a list that could be empty now check the
list's length first: mesh points, image inks, glyph origins, imported
text, the PDF mesh and arrowhead paths, and the resampled CMYK pixels.
An image that takes a Warp from its art style is checked to keep none of
the look's fills and strokes, instead of checking each of none.
The convolve-matrix tests check that the filtered rectangle is imported,
not only that the import returned Ok. The fan-out clip path test moves
to a unit test that counts the clip paths read. The self-nesting symbol
test checks that the other symbol comes back. The EPS level and preview
id test checks the param values and the trimming and case rules instead
of looping over every value. The ignored PDF text-heavy timing run says
why it is ignored.
A gradient that repeats or reflects with no stops now paints as one
that pads. Before, PDF export wrote it as two 160 by 160 images and EPS
wrote three runs of a conic where one that pads writes one;
`Gradient::is_spread` is false without stops. `paint.setFill`'s params
still report the spread.
Tests whose all() passed on an empty list now check the list's length or
that it is not empty:
- huge_circles_bridge_with_finite_anchors_or_are_refused (pathops bridge)
- smooth_rounds_corners (pathops ops): the four corners stay, smoothed
- a_held_rotation_turns_the_art_around_its_pin (tools ARAP): one point
per mesh vertex
- the_eraser_drag_area_matches_the_release_when_pressure_or_a_mode_starts_during_the_drag
(tools gesture): one released point per press
- every_effect_casts_a_shadow, inflate_cells_across_a_hole_edge_are_cut_to_the_shape,
a_plane_has_only_a_front_and_a_hollow_solid_none and
perspective_runs_0_to_160_degrees_with_the_eye_outside_the_object (three-d)
- a_file_two_branches_include_is_followed_from_the_shallower_one
(scriptcheck): one row per include line
- pens_pick_colors_and_widths (cad HP-GL): four widths
- junk_pressure_brushes_draw_finite_art (brush): all 12 cases draw
Round trips that hold by construction (parse finds the id in ALL) are
replaced with one saved name that must parse and one that must not:
follow_names_parse (pathops shared edge), the shape kinds (pathops
shapes), surfaces_parse_from_their_ids (three-d), the Quick Pen actions
(tools), names_parse_and_serialize_as_names (plugins) and the brush
variation modes, which also compare the serde names with the ids.
crop_keeps_an_instance_whose_art_reaches_the_region (cad) names the
entities written instead of checking that some were.
the_saved_engine_preference_is_found (app) pins the GPU choices the
preferences offer to the three the app reads.
timing_unite_1000_circles (pathops) gets an ignore reason and checks
that Unite gives one shape.
Each changed assertion fails when the code under test is broken (an id
renamed, a list emptied, a flush or instance dropped) and passes when it
is restored.
A scrubbed field or a canvas drag moves the revision while the sections
are not measured. When the release itself left the revision unchanged,
the panel skipped the measurement and kept the sizes from before the
drag. The edit now stays pending until a frame runs without a drag or
an open undo group.
Weak tests in vectorcraft-render and vectorcraft-trace now assert the
behavior they name:
- The stroke glow test checks that the glow is drawn and that four
threads draw what one does, instead of only rendering.
- The JPEG and palette id tests name saved ids and labels directly
(gray, optimized, none, blackWhite), unknown and empty ids, instead
of looping over every value and reading its own id back.
- The trace presets test drops the loop over every preset name, which
presets().len() already covers, and checks the [Default] and padded
name lookups by their result.
- Nested discs each get the disc below them as parent, checked exactly.
- A 20 degree bend gets no corner under a 30 degree minimum turn, and
gets one under a 10 degree minimum.
- The gray BMP, reduced CMYK and tiled image tests check the size of
what they read, and the long stroke tests check that one outline was
made before checking that none is cropped.
- The three drag timing probes assert that the frame after the drag is
what a fresh renderer draws, in place of printing two hashes.
Tests in vectorcraft-text and vectorcraft-doc that could pass on an empty
result, or that only checked a result exists, now assert the values:
- Blend: gradient steps assert their stop count before checking each
stop's swatch, tint and plates; the odd dash blended to solid asserts
the whole pattern; a copied step asserts its members.
- Symbols: limiting depth keeps every symbol; a stroke override on type
keeps the run it styles.
- File fonts: an extreme descent clamps to the lowest table value and
the Windows descent still fits.
- Invert wrap on a tangled shape asserts the line still meets it.
- Bidi, ligature carets, Thai and whitespace fallback: the glyph and
line counts are asserted, Hebrew points stay in their letters'
clusters, and every character of an isolate test has a glyph.
- Glyph categories, trace views, compound shape modes and digit
systems check written-out ids instead of a round trip over every
value.
Removed joins_on_a_circle_are_measured, which printed measurements and
asserted nothing, and chord_placement_leaves_the_join_gap_above_the_baseline,
which checked arithmetic done in the test itself;
joined_glyphs_meet_on_a_curved_path covers joined type on a curve.
Parse tests in the color crate looped over every id or label and parsed
it back. Blend modes, policies, harmony rules, recolor methods and WCAG
categories parse by looking the text up in that same table, so those
loops could not fail. They now parse representative ids, labels and
spellings, and the edge cases: "Color" next to "Color Burn", empty
text, and a label where only ids parse.
- default_swatches_parse read swatch.rs as text. It now checks the
built swatches: no two solid swatches share a color (a bad hex
literal falls back to black), and the Sunset and Ocean stops equal
the swatches their literals name.
- loads_system_cmyk_icc ran only on macOS and returned early without
the system profile. loads_icc_files_and_refuses_bad_ones runs on every
native target: a missing file is an I/O error naming the path, a file
that is not a profile is refused, and a built-in profile's bytes are
refused for their name.
- the_other_libraries_keep_classic_mixing_and_centered_midpoints is
removed: those libraries are built with Gradient::new's defaults.
- pixel_timings and bench_catalog_lookup are removed. They were ignored
and only printed timings.
- Checks over lists that can be empty now also check the count:
reverse and move keep every stop, a conic draws its 4 wedges, each
harmony gives at least two colors, the fit leaves patches out, the
wireframe draws edges, a flat warp keeps its anchors, a gradient
stroke has slices, and fitted dashes on a curve are drawn.
- the_effects_are_colour_adjustments_in_their_own_menu checks one
add-on effect and one effect outside it instead of every entry.
svg_type_shifted_two_billion_points_exports_to_pdf now checks that the
SVG import keeps the type's shift of more than 2,000,000,000 pt, and that
the exported PDF leaves the type out, read back with the PDF importer.
Before, it checked only that the export returned Ok, so an import that
dropped or clamped the shift made it pass without reaching the bound.
a_long_thin_shape_with_a_shadow_renders_and_exports now checks that the
Affinity import gives exactly one shape with a drop shadow, more than
3,000,000 pt wide, before it renders and exports it. Before, an import
that dropped the shadow made it pass without drawing one.
The other 66 test-lint hits in import_fuzz.rs are property tests whose
claim is that hostile input loads, renders and exports without a panic.
Their helpers (survive, survive_library and the others) fail the case
through TestCaseError, which the no-assertion rule does not count.
The Properties panel measured all of its sections before showing them
whenever the document's revision changed. A Selection tool drag changes
the revision on every pointer move, so each frame of the drag ran the
whole panel twice. On a blank document with one rectangle, a drag frame
ran 396 components where a hover frame ran 170.
The revision is now kept apart from the selection, tool and isolation
key. While a canvas drag or a scrubbed field is in progress, a new
revision alone does not measure the sections; the edit is measured once
when the drag ends. A drag frame now runs 168 components and each frame
still takes one pass.
main's CI fails at test-lint since #8808 merged: keys_held_during_a_touchpad_gesture_count_until_it_ends is compiled only on macOS, which no CI test leg runs. egui reports a touchpad gesture's phases only on macOS; on Windows and Linux it reads a touchpad's Ctrl+scroll as a pinch, so the test cannot run there. The allow comment names that reason.
With Include Bleed, a .vectorcraft, .ai or EPS row wrote the artboard
already grown by the document's bleed and kept the document's bleed as
well. Opened again, the file had the bleed outside the grown artboard, so
a PDF with the document's bleed came out with it twice: a 3 mm bleed made
a 6 mm one.
These files now hold the grown artboard with a bleed of 0. PDF rows and
Full Document files are unchanged. The params text and docs/mcp.md say so.
The Color tab of the gradient stop popover gave its Color panel only the
stop's sRGB, so every frame the rows worked their values out again from
that sRGB. On a CMYK stop, typing a value or dragging one slider rewrote
the other channels: typing Cyan 40 on C10 M20 Y30 K5 gave M17.3 Y24.7 K0.
The popover now passes the stop's values in its own model, as the Color
panel does, so a typed value stays as typed and a drag changes only the
dragged channel. The new test types Cyan, sets Magenta and drags Yellow
on a CMYK stop and checks the exact channel values after each edit.