Skip to content

test(brushes): add brush compatibility and round-trip tests - #142

Open
wesleydanieell wants to merge 2 commits into
artcraft-android:mainfrom
wesleydanieell:test/brush-parity
Open

wesleydanieell wants to merge 2 commits into
artcraft-android:mainfrom
wesleydanieell:test/brush-parity

Conversation

@wesleydanieell

Copy link
Copy Markdown
Contributor

This PR adds tests to help maintain brush compatibility and catch regressions as the brush engine evolves.

The new tests cover:

  • The included Procreate-style brush sets and their expected brushes.
  • Preview differences between brushes.
  • Pressure response for pencils, airbrushes, and other brush types.
  • Brush and brush set round-trip serialization.
  • Consistency between Brush Studio settings, previews, and actual canvas strokes.

It also includes an optional test for importing external brush files, controlled through environment variables.

Testing

  • 6 tests passed.
  • 0 failures.
  • 1 external-file test ignored by default because it requires a user-provided brush file.

These tests provide a foundation for validating future brush engine improvements.

…ponse

Checks the shipped kit against what it stands in for:
- the eleven Procreate sets are there with a real number of brushes, and
  the best known brushes (6B Pencil, Round Pen, Round Brush, Soft Airbrush,
  Charcoal Stick, Wet Wash, Script Brush, Canvas Texture, Spray Can) are in
  their sets;
- no two of the 204 brushes draw the same preview, the brush engine's whole
  range is distinct;
- 6B Pencil answers pressure with opacity and grain, Soft Airbrush is soft
  and answers with opacity only, Studio Ink answers with size, Oil Paint
  mixes wet and Charcoal Stick has grain;
- a pressure stroke lays more pixels and more ink at 0.95 than at 0.15 for
  the pencil and the airbrush.
- a .brush and a .brushset come back through their own files with their
  settings and their brushes in order;
- a change made in the Brush Studio shows in the brush's preview and on the
  canvas (flow, faint and solid);
- an ignored, env-driven test imports a real file from outside
  (BRUSH_FILE=...), reports the set, the weak previews and how many brushes
  draw no stroke, with BRUSH_ALL=1 for every brush.
bearinmindcat added a commit that referenced this pull request Nov 11, 2026
…und trips (#142)


Co-authored-by: Wesley <danielwesley266@gmail.com>
@bearinmindcat

Copy link
Copy Markdown
Contributor

adda01c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants