Testing & Compatibility

Testing and Compatibility

Compile-only test rules, generated C++ review, test organization, and failure handling.

Raz Gen2 Manual·Testing & Compatibility

Test directory

tests/
├── run-tests.raz
├── run-tests
├── manifest.json
├── cases/
├── fixtures/
├── negative/
└── native_api.hpp

Test inventory

Item Current rule
tests/manifest.json Lists positive compile cases and expected-rejection cases.
tests/cases/ Each source must compile successfully to a non-empty .cpp output.
tests/negative/ Each source must be rejected by the Raz compiler.
tests/fixtures/ Provides test modules, headers, macro input, and other fixture data.
tests/run-tests.raz Reads the manifest, invokes the compiler, records each result, and continues after failures.
tests/run-tests Launcher for building/running the native test-runner executable under project build configuration.
Generated C++ Written alongside source files and reviewed manually; not compiled or executed automatically by the standard runner.

Acceptance criteria

  • A positive case passes when Raz compilation succeeds and produces non-empty C++ output.
  • A negative case passes when the Raz compiler rejects the source.
  • The runner continues through the full manifest after an individual failure.
  • Generated C++ remains available for manual inspection and comparison.
  • Native compilation or execution is added only when a particular behavior requires that extra validation.
Important boundary: a compile-only pass does not prove that all emitted C++ is accepted by GNU C++ or that a generated executable behaves correctly. Those are separate checks, requested explicitly when appropriate.

Compatibility work to define

A versioned compiler baseline and a process for comparing generated output should be formalized before the project promises broad output compatibility. Tests should focus heavily on the emitted C++ structure because that output is a primary review artifact.