LDC-E1377 — Test extending a referenced case
For LLMs5 sections
What it means
Section titled “What it means”A test can run against a case declared elsewhere — by reference, not by copy. But a reference is exact: the test takes the case as it is. Appending changed information to the reference does not extend the case; it describes a different case that happens to share a name. The compiler stops at the reference: changed information is another case, declared in its own file.
The repair is to write the input inline in the test’s given block, or to declare the changed situation as a separate case. A test borrows a case whole or not at all.
Example
Section titled “Example”{"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 \"borrows\" {\n given case Solo {\n context {\n legal_time @2026-08-26;\n }\n }\n\n evaluate truth(sunny());\n\n expect evaluation_status == COMPUTED;\n}\n"}, "expect": "LDC-E1377"}{"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 \"borrows\" {\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}Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.