# bimr-engine — test targets.
#
# The fork-A eval is the experiment; the copied core (lexer, grammar,
# parser) is the frozen harness. `make test` runs everything.

.PHONY: test test-eval test-cli test-core clippy fmt check build run-sample

test: test-core test-eval test-cli

## Core — the copied harness, byte-identical to master
test-core:
	cargo test -p lexer -p parser

## The experiment — eval unit tests
test-eval:
	cargo test -p eval

## End-to-end — the cli gates on the wall corpus
test-cli:
	cargo test -p cli

clippy:
	cargo clippy --all-targets

fmt:
	cargo fmt

fmt-check:
	cargo fmt --check

check:
	cargo fmt --check && cargo clippy --all-targets && cargo test

build:
	cargo build

## Replay the reference sample through the cli (output to /tmp — never
## write back into the copied corpus)
run-sample:
	cargo run --quiet --bin bimr-cli -- build samples/bimr/wall.bimr --output /tmp/opencode/wall.ifcx
	@cat /tmp/opencode/wall.ifcx
