@@ -6,6 +6,7 @@ import { join } from "node:path";
66import { LANES , DEFAULT_LANE , laneById , laneIds , laneForModuleSpec , selectLane } from "../einsiedler/lanes/index.mjs" ;
77import { fastCheckLane , fastCheckSeed } from "../einsiedler/lanes/fast-check.mjs" ;
88import { hypothesisLane } from "../einsiedler/lanes/hypothesis.mjs" ;
9+ import { csharpFsCheckLane } from "../einsiedler/lanes/csharp-fscheck.mjs" ;
910import { makeSubprocessLane } from "../einsiedler/lanes/subprocess.mjs" ;
1011
1112test ( "fastCheckSeed: whole-token derivation — pure int preserved, distinct tokens never collide" , ( ) => {
@@ -22,7 +23,7 @@ test("fastCheckSeed: whole-token derivation — pure int preserved, distinct tok
2223} ) ;
2324
2425test ( "registry exposes fast-check and hypothesis lanes with the Lane shape" , ( ) => {
25- assert . deepEqual ( laneIds ( ) . sort ( ) , [ "fast-check" , "hypothesis" ] ) ;
26+ assert . deepEqual ( laneIds ( ) . sort ( ) , [ "csharp-fscheck" , " fast-check", "hypothesis" ] ) ;
2627 for ( const lane of LANES ) {
2728 assert . equal ( typeof lane . id , "string" ) ;
2829 assert . equal ( typeof lane . language , "string" ) ;
@@ -35,6 +36,7 @@ test("registry exposes fast-check and hypothesis lanes with the Lane shape", ()
3536} ) ;
3637
3738test ( "selectLane: explicit --lane wins, unknown id throws" , ( ) => {
39+ assert . equal ( selectLane ( { lane : "csharp-fscheck" } ) , csharpFsCheckLane ) ;
3840 assert . equal ( selectLane ( { lane : "hypothesis" } ) , hypothesisLane ) ;
3941 assert . equal ( selectLane ( { lane : "fast-check" } ) , fastCheckLane ) ;
4042 assert . throws ( ( ) => selectLane ( { lane : "nope" } ) , / u n k n o w n l a n e ' n o p e ' / ) ;
@@ -49,6 +51,14 @@ test("selectLane: auto-detects the lane from the module extension", () => {
4951 } finally {
5052 rmSync ( dir , { recursive : true , force : true } ) ;
5153 }
54+ const csharpDir = mkdtempSync ( join ( tmpdir ( ) , "einsiedler-lanes-" ) ) ;
55+ try {
56+ writeFileSync ( join ( csharpDir , "a.cs" ) , "public static class A { }\n" ) ;
57+ assert . equal ( laneForModuleSpec ( csharpDir ) , csharpFsCheckLane ) ;
58+ assert . equal ( selectLane ( { modules : csharpDir } ) , csharpFsCheckLane ) ;
59+ } finally {
60+ rmSync ( csharpDir , { recursive : true , force : true } ) ;
61+ }
5262 const jsDir = mkdtempSync ( join ( tmpdir ( ) , "einsiedler-lanes-" ) ) ;
5363 try {
5464 writeFileSync ( join ( jsDir , "a.eks.mjs" ) , "export function properties() { return []; }\n" ) ;
@@ -89,6 +99,19 @@ test("fast-check lane runs its canary and emits the normalized protocol", async
8999 assert . ok ( results . every ( ( r ) => r . status === "FALSIFIED" ) , "canary must be caught as FALSIFIED" ) ;
90100} ) ;
91101
102+ test ( "csharp-fscheck lane runs scaffold canary and marks real modules unimplemented" , async ( ) => {
103+ const modules = csharpFsCheckLane . resolveModules ( csharpFsCheckLane . canaryDir ) ;
104+ assert . ok ( modules . length >= 1 ) ;
105+ const canary = await csharpFsCheckLane . run ( { modules, seed : "1" , numRuns : 100 , minRuns : 1 } ) ;
106+ assert . ok ( canary . length >= 1 ) ;
107+ assert . ok ( canary . every ( ( r ) => r . status === "FALSIFIED" ) , "scaffold canary must be intentionally FALSIFIED" ) ;
108+
109+ const real = await csharpFsCheckLane . run ( { modules : [ "/tmp/example.cs" ] , seed : "1" , numRuns : 100 , minRuns : 1 } ) ;
110+ assert . equal ( real . length , 1 ) ;
111+ assert . equal ( real [ 0 ] . status , "ERROR" ) ;
112+ assert . match ( real [ 0 ] . error , / n o t y e t i m p l e m e n t e d / ) ;
113+ } ) ;
114+
92115test ( "hypothesis lane: SKIP if the Python runtime is absent, else its canary FALSIFIES" , async ( ) => {
93116 const probe = await hypothesisLane . probe ( ) ;
94117 if ( ! probe . available ) {
0 commit comments