IF Commons GitHub

logical/conformance/mod

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0005-anyfs-posix-conformance FR-002, 0005-anyfs-posix-conformance FR-001

The conformance suite of AnyFS POSIX: the cases every view of a store passes, each needing and lacking named capabilities, and the functions that choose and run them. A test calls runPosixConformance with a function that makes a new world over an empty store, and the suite runs every case whose capabilities the store has and says which failed and how.

import { runPosixConformance } from "./mod.ts";
// const report = await runPosixConformance(async () => ({ posix: posix(memoryStore()) }))
// report.filter((r) => r.failure !== undefined) // the cases that failed

Source: commons/anyfs-posix/src/logical/conformance/mod.ts

6 of 7 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

MODEL_SEEDSconst
const MODEL_SEEDS: readonly [1, 2, 3, 4, 5]

The seeds of the model cases the suite runs.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

MODEL_STEPSconst
const MODEL_STEPS: 250

The operations of each model case.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

ALL_CASESconst
const ALL_CASES: readonly Case[]

Every case of the suite, the model cases included.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

casesForfunction
function casesFor(capabilities: Iterable<"append" | "batch" | "cas" | "delete" | "history" | "list" | "lock" | "merge" | "rangeRead" | "read" | "rename" | "search" | "stat" | "watch" | "write">, traced?: boolean): readonly Case[]

The cases a store with these capabilities is held to: those whose needs it has and whose lacks it does not, and those that need a trace only where it records one.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

CaseReporttypeno test imports it
type CaseReport = { readonly id: string; readonly title: string; readonly failure?: string };

What one case did.

runCasefunction
function runCase(c: Case, make: Make): Promise<CaseReport>

Runs one case against worlds made by make: its report, with the failure as a sentence.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

runPosixConformancefunction
function runPosixConformance(make: Make): Promise<readonly CaseReport[]>

Runs every case a view is held to: the capabilities and the trace are read from a first world.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.