diff --git a/spec/fuzzing.spec.ts b/spec/fuzzing.spec.ts index bcb03bbfdf56ba4dd6811e437caa917bf70adbb4..2db175ac8c7d97f2a0d7c09b65a314e2af1b22ad 100644 --- a/spec/fuzzing.spec.ts +++ b/spec/fuzzing.spec.ts @@ -1,5 +1,5 @@ import { CalculatorType } from "../src/compute-node"; -import { Grille, ParamDomainValue, Session, SPP, YAXN, YAXNParams, Par, ParSimulation, PressureLoss, PL_LechaptCalmonParams, PL_LechaptCalmon, PL_StricklerParams, PL_Strickler } from "../src/index"; +import { Grille, ParamDomainValue, Session, SPP, YAXN, YAXNParams, Par, ParSimulation, PressureLoss, PL_LechaptCalmonParams, PL_LechaptCalmon, PL_StricklerParams, PL_Strickler, MacroRugoRemous, MacroRugo } from "../src/index"; import { MacrorugoCompound } from "../src/macrorugo/macrorugo_compound"; import { Trigo, TrigoOperation } from "../src/math/trigo"; import { Nub } from "../src/nub"; @@ -60,7 +60,8 @@ const nubsWithStructures: CalculatorType[] = [ const nubsWithSection: CalculatorType[] = [ CalculatorType.RegimeUniforme, CalculatorType.SectionParametree, - CalculatorType.CourbeRemous + CalculatorType.CourbeRemous, + CalculatorType.MacroRugoRemous ]; const nubsWithPressureLossLaw: CalculatorType[] = [ @@ -205,6 +206,13 @@ function setMacrorugoCompound(n: MacrorugoCompound) { n.setPropValue("inclinedApron", Math.floor(Math.random() * 2)); } +function setMacrorugoRemous(mrr: MacroRugoRemous) { + const mr: MacroRugo = CreateTestNub(CalculatorType.MacroRugo) as MacroRugo; + Session.getInstance().registerNub(mr); + mrr.setPropValue("nubMacroRugo", mr.uid); + mrr.setNubMacroRugoFromProps(); +} + function setGrille(g: Grille) { const type = Math.floor(Math.random() * 3); const profile = Math.floor(Math.random() * 2); @@ -266,6 +274,10 @@ function CreateTestNub(iCalType: number): Nub { case CalculatorType.ParSimulation: setRandomParType(n as ParSimulation); break; + + case CalculatorType.MacroRugoRemous: + setMacrorugoRemous(n as MacroRugoRemous); + break; } for (const p of n.parameterIterator) {