/**
 * Lane B selftests — cloth, corner loads, failure cascade, prep economy.
 *
 * The asserts themselves live next to the code they test, in
 * `js/sail.selftest.js` and `js/rigging.selftest.js`, exported as [name, fn]
 * pairs. This file is only the adapter that hands them to Lane A's Suite.
 *
 * The reason for the indirection: those two modules also run under plain
 * `node web/world/js/sail.selftest.js` — no browser, no server, no renderer,
 * ~6 s — which is how the cloth got proven before M0 landed. Keeping the
 * asserts there means the browser suite and the headless suite can never drift,
 * because they are literally the same array.
 *
 * PLAN3D §5-B asked for three asserts. All three are in there, plus a statics
 * balance that pins the load meter to real newtons:
 *   1. hypar sheds load — scored on WORST CASE over eight wind directions
 *      rather than one, because Lane C's storms veer and the player never gets
 *      to pick the wind. Per-direction would be a false assert: a flat sail
 *      sitting edge-on to the wind genuinely has low drag and beats the hypar
 *      from that one angle. Worst-case is what the hardware has to survive.
 *   2. cascade — break a corner at fixed t, a neighbour's load spikes >= 2x.
 *   3. determinism — byte-equal load traces, plus ragged frame dt converging on
 *      the fixed-dt trace (Lane A's render loop delivers ragged dt, so the
 *      accumulator has to absorb it or none of this applies to the real game).
 */

import { SAIL_TESTS } from '../sail.selftest.js';
import { RIGGING_TESTS } from '../rigging.selftest.js';

/** @param {import('../testkit.js').Suite} t */
export default function run(t) {
  for (const [name, fn] of SAIL_TESTS) t.test(name, fn);
  for (const [name, fn] of RIGGING_TESTS) t.test(`rigging: ${name}`, fn);
}
