Test suite overview
DevPixelForge has 316+ tests spread across three categories:| Component | Type | Count | Location |
|---|---|---|---|
| Rust operations | Unit (inline) | 280+ | dpf/src/*/tests |
| Rust pipeline | Integration | 20+ | dpf/tests/integration_tests.rs |
| Go bridge | Unit + integration | 16+ | go-bridge/dpf_test.go |
| Total | — | 316+ | — |
Running tests
- Make
- Rust tests
- Go tests
The This is a smoke test — it confirms the binary compiled correctly and its capability report is valid. For the full test suite, run Rust and Go tests directly.
make test target builds the Rust binary and verifies it by running dpf caps:Test fixtures
The Rust test suite uses a set of pre-generated image fixtures. Generate them with:dpf/test_fixtures/:
| Fixture | Description |
|---|---|
sample.png | RGBA 100×100 gradient |
sample.jpg | JPEG 100×100 |
sample.svg | SVG vector 100×100 |
sample_transparent.png | PNG with alpha channel |
large.png | 1000×1000 PNG |
solid_red.png | Solid red fill |
solid_blue.png | Solid blue fill |
corrupt/bad.png | Corrupt file for error-path tests |
Parallel execution and slow tests
Cargo runs tests in parallel by default. You can control the thread count:Troubleshooting
“Binary not found” in Go tests The Go bridge tests look for thedpf binary at a path relative to the repo root. Build the Rust binary first:
cargo test compiles all dev-dependencies (including tempfile and assert_fs). Subsequent runs use the incremental cache and are much faster.