Files
Web_FreeCAD_Bitbybit/scripts/run-sketcher-stress.ts

9 lines
724 B
TypeScript

import { runSketchStress } from '../src/facade/sketchStress'
const report = runSketchStress({ models: 500, seed: 0x20260803 })
if (report.deterministicMismatches !== 0) throw new Error(`Sketch stress found ${report.deterministicMismatches} deterministic mismatches.`)
if (report.unexpectedResults !== 0) throw new Error(`Sketch stress found ${report.unexpectedResults} unexpected solver results.`)
if (report.durationMs > 2_000) throw new Error(`Sketch stress exceeded the 2000 ms budget: ${report.durationMs} ms.`)
if (report.maxIterations > 64) throw new Error(`Sketch stress exceeded the 64 iteration budget: ${report.maxIterations}.`)
console.log(JSON.stringify({ status: 'sketcher-stress-pass', ...report }, null, 2))