docs← Back to article

Markdown for LLMs

LDC-E1316 — A test that asserts nothing

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E1316 — A test that asserts nothing

## What it means

A test that asks a question but checks no answer always passes — and
therefore proves nothing. The question runs, the result fields come
back, and nobody reads them. The compiler refuses the vacuous test
rather than counting a free pass: an `evaluate` without `expect`
addresses result fields nobody asked to verify.

The repair is to assert what the question must produce. Every
evaluation step deserves at least one expectation; a step nobody
checks is a step the suite could delete without noticing.

## Example

```run
{"argv": ["lower-test", "$ROOT/test.lawtest"], "files": {"test.lawtest": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nrelation sunny() kind institutional;\n\ntest \"vacuous\" {\n    given {\n        context {\n            legal_time @2026-08-26;\n        }\n    }\n\n    evaluate truth(sunny());\n}\n"}, "expect": "LDC-E1316"}
```

## Fix

```run
{"argv": ["lower-test", "$ROOT/test.lawtest"], "files": {"test.lawtest": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nrelation sunny() kind institutional;\n\ntest \"vacuous\" {\n    given {\n        context {\n            legal_time @2026-08-26;\n        }\n    }\n\n    evaluate truth(sunny());\n\n    expect evaluation_status == COMPUTED;\n}\n"}, "expect": null}
```

## Engine message

The engine reports this in its own wording:

```text
$ROOT/test.lawtest:7:6: error LDC-E1316: the test asserts nothing: without `expect` it always passes (§267)
```

## Related

- [LDC-E1319](/diagnostics/LDC-E1319/) — an expectation outside the question vocabulary.
- [LDC-E1315](/diagnostics/LDC-E1315/) — lowering a file that declares no case.