From 83ce4dd94e122a4d35b2e330a5101c8c1387e104 Mon Sep 17 00:00:00 2001 From: David Dorchies <david.dorchies@irstea.fr> Date: Thu, 4 Jul 2019 16:59:19 +0200 Subject: [PATCH] #33 Correct failed test following 27e9dfe61 --- spec/pab/pab.spec.ts | 2 +- src/pab/cloison_aval.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/pab/pab.spec.ts b/spec/pab/pab.spec.ts index 292f7785..9aa599ee 100644 --- a/spec/pab/pab.spec.ts +++ b/spec/pab/pab.spec.ts @@ -183,7 +183,7 @@ describe("Class Pab: ", () => { pab.calculatedParam = pab.prms.Z1; checkPabResults(pab, 78.27); }); - it("Calc(Q) should return 0.773", () => { + it("CalcSerie(Q) should return 0.773", () => { pab.calculatedParam = pab.prms.Q; checkPabResults(pab, 0.773); }); diff --git a/src/pab/cloison_aval.ts b/src/pab/cloison_aval.ts index e35b4c08..1dbe3037 100644 --- a/src/pab/cloison_aval.ts +++ b/src/pab/cloison_aval.ts @@ -54,7 +54,7 @@ export class CloisonAval extends ParallelStructure { s.prms.ZDV.v = s.prms.maxZDV.v; } } - if (this._result === undefined || this._result.ok) { + if (!this.hasVanneLevante() || this.result.ok) { // Calculation of Z1 with the new ZDV in case of existing vanne levante this.currentResult = super.Calc("Z1", rInit); if (this.result.ok) { @@ -74,7 +74,7 @@ export class CloisonAval extends ParallelStructure { } } } - return this._result; + return this.result; } /** -- GitLab