Commit 471e7f3b authored by Dorchies David's avatar Dorchies David
Browse files

test(verificateur): update tests on MacroRugo and MacroRugoComp after #283

parent b615d567
......@@ -874,6 +874,7 @@ describe("vérificateur de franchissement −", () => {
mr.prms.B.singleValue = 1.789; // 2 patterns
mr.prms.C.singleValue = 0.2; // limite la vitesse max
mr.prms.PBH.singleValue = 0.6; // limite la vitesse max
mr.prms.Cd0.singleValue = 2.6; // limite la vitesse max
// vérificateur
const v = new Verificateur();
v.nubToVerify = mr;
......@@ -1009,7 +1010,7 @@ describe("vérificateur de franchissement −", () => {
it("Largeur franchissable insuffisante", () => {
// contexte
Session.getInstance().clear();
Session.getInstance().unserialise(`{"header":{"source":"jalhyd","format_version":"1.3","created":"2020-05-11T09:00:31.023Z"},"settings":{"precision":1e-7,"maxIterations":100,"displayPrecision":3},"documentation":"","session":[{"uid":"b2tnbW","props":{"calcType":"MacroRugoCompound","inclinedApron":"INCLINED"},"meta":{"title":"M-Rugo complexe"},"children":[{"uid":"cnl6cT","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.223},{"symbol":"B","mode":"SINGLE","value":1.109}]},{"uid":"cmduNT","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":11.668},{"symbol":"B","mode":"SINGLE","value":1.11}]},{"uid":"d292eG","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":11.113},{"symbol":"B","mode":"SINGLE","value":1.109}]},{"uid":"Y3AycW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":10.668},{"symbol":"B","mode":"SINGLE","value":0.672}]}],"parameters":[{"symbol":"L","mode":"SINGLE","value":1},{"symbol":"If","mode":"SINGLE","value":0.05},{"symbol":"Ks","mode":"SINGLE","value":0.01},{"symbol":"C","mode":"SINGLE","value":0.13},{"symbol":"PBD","mode":"SINGLE","value":0.4},{"symbol":"PBH","mode":"SINGLE","value":0.4},{"symbol":"Cd0","mode":"SINGLE","value":1.2},{"symbol":"Z1","mode":"SINGLE","value":13.1},{"symbol":"ZRL","mode":"SINGLE","value":10.5},{"symbol":"ZRR","mode":"SINGLE","value":12.5},{"symbol":"BR","mode":"SINGLE","value":4},{"symbol":"DH","mode":"SINGLE","value":3}]},{"uid":"Z215Y2","props":{"calcType":"Verificateur","nubToVerify":"b2tnbW","speciesList":["dDZzOX"]},"meta":{"title":"Vérification"},"children":[],"parameters":[]},{"uid":"dDZzOX","props":{"calcType":"Espece","species":"SPECIES_CUSTOM"},"meta":{"title":"Espèce"},"children":[],"parameters":[{"symbol":"OK","mode":"CALCUL"},{"symbol":"DHMaxS","mode":"SINGLE","value":0.35},{"symbol":"DHMaxP","mode":"SINGLE","value":0.35},{"symbol":"BMin","mode":"SINGLE","value":0.3},{"symbol":"PMinS","mode":"SINGLE","value":1},{"symbol":"PMinP","mode":"SINGLE","value":1},{"symbol":"LMinS","mode":"SINGLE","value":2.5},{"symbol":"LMinP","mode":"SINGLE","value":2.5},{"symbol":"HMin","mode":"SINGLE","value":0.3},{"symbol":"YMin","mode":"SINGLE","value":2.2},{"symbol":"VeMax","mode":"SINGLE","value":2.5},{"symbol":"YMinSB","mode":"SINGLE","value":0.2},{"symbol":"YMinPB","mode":"SINGLE","value":0.3},{"symbol":"PVMaxLim","mode":"SINGLE","value":800000}]}]}`);
Session.getInstance().unserialise(`{"header":{"source":"jalhyd","format_version":"1.3","created":"2021-02-13T10:21:53.436Z"},"settings":{"precision":1e-7,"maxIterations":100,"displayPrecision":3},"documentation":"","session":[{"uid":"b2tnbW","props":{"calcType":"MacroRugoCompound","inclinedApron":"INCLINED"},"meta":{"title":"M-Rugo complexe"},"children":[{"uid":"MHV3dW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.052},{"symbol":"B","mode":"SINGLE","value":0.894}]},{"uid":"aDJrOG","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.156},{"symbol":"B","mode":"SINGLE","value":0.895}]},{"uid":"MXF4cW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.26},{"symbol":"B","mode":"SINGLE","value":0.894}]},{"uid":"czE5Y2","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.364},{"symbol":"B","mode":"SINGLE","value":0.895}]},{"uid":"ajZteW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.458},{"symbol":"B","mode":"SINGLE","value":0.722}]}],"parameters":[{"symbol":"L","mode":"SINGLE","value":1},{"symbol":"If","mode":"SINGLE","value":0.05},{"symbol":"Ks","mode":"SINGLE","value":0.01},{"symbol":"C","mode":"SINGLE","value":0.2},{"symbol":"PBD","mode":"SINGLE","value":0.4},{"symbol":"PBH","mode":"SINGLE","value":0.6},{"symbol":"Cd0","mode":"SINGLE","value":2.6},{"symbol":"Z1","mode":"SINGLE","value":13.1},{"symbol":"ZRL","mode":"SINGLE","value":12.5},{"symbol":"ZRR","mode":"SINGLE","value":12},{"symbol":"BR","mode":"SINGLE","value":4.3},{"symbol":"DH","mode":"SINGLE","value":3}]},{"uid":"Z215Y2","props":{"calcType":"Verificateur","nubToVerify":"b2tnbW","speciesList":["dDZzOX"]},"meta":{"title":"Vérification"},"children":[],"parameters":[]},{"uid":"dDZzOX","props":{"calcType":"Espece","divingJetSupported":"NOT_SUPPORTED","species":"SPECIES_CUSTOM"},"meta":{"title":"Espèce"},"children":[],"parameters":[{"symbol":"OK","mode":"CALCUL"},{"symbol":"DHMaxS","mode":"SINGLE","value":0.35},{"symbol":"DHMaxP","mode":"SINGLE","value":0.35},{"symbol":"BMin","mode":"SINGLE","value":0.3},{"symbol":"PMinS","mode":"SINGLE","value":1},{"symbol":"PMinP","mode":"SINGLE","value":1},{"symbol":"LMinS","mode":"SINGLE","value":2.5},{"symbol":"LMinP","mode":"SINGLE","value":2.5},{"symbol":"HMin","mode":"SINGLE","value":0.3},{"symbol":"YMin","mode":"SINGLE","value":0.6},{"symbol":"VeMax","mode":"SINGLE","value":2},{"symbol":"YMinSB","mode":"SINGLE","value":0.2},{"symbol":"YMinPB","mode":"SINGLE","value":0.3},{"symbol":"PVMaxPrec","mode":"SINGLE","value":150},{"symbol":"PVMaxLim","mode":"SINGLE","value":800000}]}]}`);
const v = Session.getInstance().findNubByUid("Z215Y2") as Verificateur;
// résultat
const res = v.CalcSerie();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment