import type { RunRecord } from './record.js'; /** The files of one case, keyed by the name `conformance.md` section 2 gives them. */ export type CaseFiles = Readonly>; /** Why a record could not become a case. */ export interface CaseRefusal { readonly ok: false; readonly reason: string; /** * The catalogue code the refusal is filed under, or null. * * A refusal about a setting of the run is the catalogue's, OS6021, because * it is the same refusal the run makes of a setting it cannot be carried out * under. The others here are about what the record holds, a text it never * carried, a bar list it only points at, a fact its host never stated, and * no catalogue entry is about those. */ readonly code: string | null; } export interface CaseWritten { readonly ok: true; readonly files: CaseFiles; } export type CaseResult = CaseWritten | CaseRefusal; /** What the caller has to say, because a record cannot know it. */ export interface CaseIdentity { /** * The directory path under the suite root, which is also the case id. * * The caller's because a record does not know where it will live, and * `case.json` repeats it on purpose so a directory that is moved without its * id being changed is caught by the suite rather than by a confused reader. */ readonly id: string; /** One sentence. It is the failure message a runner prints. */ readonly description: string; /** Section 7's categories. Defaults to the one a strategy run belongs to. */ readonly category?: string; } /** * `conformance.md` section 6: the loosest bounds a conformance case may declare. * * Core reads no page, so the two figures are written here, and * `tests/backtest/case-settings.test.ts` reads them out of section 6 and holds * these to the page, which is the arrangement `stdlib.md` section 20's figures * are under. Past either bound a run may still be a useful comparison; what it * is not is a case, so the projection makes no file of it. */ export declare const TOLERANCE_CAP: { readonly rel: number; readonly abs: number; }; /** * The files for one case, or the reason there are none. * * `now` is written only when the run pinned one. A case that names it when the * script never asked pins a clock the run did not depend on, and the next * reader has to work out whether it mattered. */ export declare function caseFilesFrom(record: RunRecord, identity: CaseIdentity): CaseResult; //# sourceMappingURL=case.d.ts.map