# Testing

- **Unit tests:**
  - `aura_tests` (`tests/`) links only against `aura::*`.
  - `tests/test_aura.cpp` covers the parser, diagnostics, and generator.
  - `tests/test_aura_ui.cpp` builds the files in `tests/ui/` both compiled and through the loader, then checks the same behavior: records, in-place rebuilding of `repeat` and `if`, updated IDs, signals, layouts, animations, text input, and reusable elements.
- **Gallery (AURA pixel tests):** `tests/gallery/*.aura` shows the built-in elements in their various states as previews; `tests/gallery.sh` renders them with the supplied font (`tests/fonts`, DejaVu Sans) and compares them against `tests/gallery-refs/default/`. `ctest` runs this too (`aura_gallery`). After an intentional change, run `tests/gallery.sh --update`, then inspect the images in `git diff`. Add a preview here for every new element.

The demo is also tested in compiled and dynamic modes. For visual comparisons, `aura-view --render-previews` and `aura-demo --render-all` can produce PNGs without a window.
