Commit 32b51878 authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

Removed most references to old "extraResults"

parent 7388f99b
......@@ -188,7 +188,7 @@ function testMacroRugoConfig(sInstance: string, Q0: number, fVal0: number, mrExt
for (const sExtraRes in mrExtraRes) {
if (mrExtraRes.hasOwnProperty(sExtraRes)) {
it(`${sExtraRes} should be ${mrExtraRes[sExtraRes]}`, () => {
expect(MacroRugoFactory(sInstance).Calc("Q").extraResults[sExtraRes])
expect(MacroRugoFactory(sInstance).Calc("Q").values[sExtraRes])
.toBeCloseTo(mrExtraRes[sExtraRes], 5);
});
}
......
......@@ -27,20 +27,20 @@ describe("class CloisonAval", () => {
it("Calc(Z1) should return 75.077 and extraResults.ZDV should be 73.95", () => {
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.077, 3);
expect(r.extraResults.ZDV).toBeCloseTo(73.95, 2);
expect(r.values.ZDV).toBeCloseTo(73.95, 2);
});
it("ZDV min bound Calc(Z1) should return 75.059 and extraResults.ZDV should be 73.9", () => {
s.prms.maxZDV.singleValue = 73.90;
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.059, 3);
expect(r.extraResults.ZDV).toBeCloseTo(73.9, 2);
expect(r.values.ZDV).toBeCloseTo(73.9, 2);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_VANLEV_ZDV_SUP_MAX);
});
it("ZDV max bound Calc(Z1) should return 75.096 and extraResults.ZDV should be 74", () => {
s.prms.minZDV.singleValue = 74;
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.096, 3);
expect(r.extraResults.ZDV).toBeCloseTo(74, 2);
expect(r.values.ZDV).toBeCloseTo(74, 2);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_VANLEV_ZDV_INF_MIN);
});
});
......@@ -59,20 +59,20 @@ describe("class CloisonAval", () => {
});
it("Calc(Z1) should return 75.077 and extraResults.ZDV should be 73.431", () => {
expect(ca.CalcSerie().vCalc).toBeCloseTo(75.077, 3);
expect(ca.CalcSerie().extraResults.ZDV).toBeCloseTo(73.431, 2);
expect(ca.CalcSerie().values.ZDV).toBeCloseTo(73.431, 2);
});
it("ZDV min bound Calc(Z1) should return 75.071 and extraResults.ZDV should be 73.4", () => {
s.prms.maxZDV.singleValue = 73.40;
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.071, 3);
expect(r.extraResults.ZDV).toBeCloseTo(73.4, 2);
expect(r.values.ZDV).toBeCloseTo(73.4, 2);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_VANLEV_ZDV_SUP_MAX);
});
it("ZDV max bound Calc(Z1) should return 75.092 and extraResults.ZDV should be 73.5", () => {
s.prms.minZDV.singleValue = 73.5;
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.092, 3);
expect(r.extraResults.ZDV).toBeCloseTo(73.5, 2);
expect(r.values.ZDV).toBeCloseTo(73.5, 2);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_VANLEV_ZDV_INF_MIN);
});
});
......
......@@ -44,7 +44,7 @@ describe("Class Cloisons: ", () => {
expect(c.CalcSerie().vCalc).toBeCloseTo(0.407, 3);
});
it("extraResults.PV should return 199.7", () => {
expect(c.CalcSerie().extraResults.PV).toBeCloseTo(199.7, 1);
expect(c.CalcSerie().values.PV).toBeCloseTo(199.7, 1);
});
it("ZRMB should be 100.5", () => {
c.CalcSerie();
......@@ -86,9 +86,9 @@ describe("Class Cloisons: ", () => {
modelCloisons.calculatedParam = modelCloisons.prms.Q;
const res = modelCloisons.CalcSerie();
expect(res.vCalc).toBeCloseTo(0.773, 2);
expect(res.extraResults.PV).toBeCloseTo(150.1, 1);
expect(res.extraResults.ZRMB).toBeCloseTo(76.54, 2);
expect(modelCloisons.structures[0].result.extraResults.ZDV).toBeCloseTo(76.67, 2);
expect(res.values.PV).toBeCloseTo(150.1, 1);
expect(res.values.ZRMB).toBeCloseTo(76.54, 2);
expect(modelCloisons.structures[0].result.values.ZDV).toBeCloseTo(76.67, 2);
});
});
......
......@@ -118,27 +118,27 @@ function checkPabResults(p: Pab, vCalc: number) {
];
// Cote de l'eau dernier bassin à l'amont de la cloison aval
expect(p.downWall.result.vCalc).toBeCloseTo(75.077, 2);
expect(p.downWall.result.extraResults.DH).toBeCloseTo(0.217, 2);
expect(p.downWall.result.extraResults.ZRAM).toBeCloseTo(73.435, 2);
expect(p.downWall.result.extraResults.Q).toBeCloseTo(0.773, 2);
expect(p.downWall.result.extraResults.x).toBeCloseTo(3.1 * 14, 2);
expect(p.downWall.result.values.DH).toBeCloseTo(0.217, 2);
expect(p.downWall.result.values.ZRAM).toBeCloseTo(73.435, 2);
expect(p.downWall.result.values.Q).toBeCloseTo(0.773, 2);
expect(p.downWall.result.values.x).toBeCloseTo(3.1 * 14, 2);
for (let i = 0; i < 14; i++) {
// Cote de l'eau à l'amont de la cloison amont du bassin
expect(p.children[i].result.vCalc).toBeCloseTo(tRef[i][0], 2);
// Puissance volumique dissipée
expect(p.children[i].result.extraResults.PV).toBeCloseTo(tRef[i][1], 0);
expect(p.children[i].result.values.PV).toBeCloseTo(tRef[i][1], 0);
// Tirant d'eau moyen
expect(p.children[i].result.extraResults.YMOY).toBeCloseTo(tRef[i][2], 2);
expect(p.children[i].result.values.YMOY).toBeCloseTo(tRef[i][2], 2);
// Chute
expect(p.children[i].result.extraResults.DH).toBeCloseTo(tRef[i][3], 2);
expect(p.children[i].result.values.DH).toBeCloseTo(tRef[i][3], 2);
// Débits
expect(p.children[i].result.extraResults.Q).toBeCloseTo(0.773, 2);
expect(p.children[i].result.extraResults.QA).toBeCloseTo(0, 2);
expect(p.children[i].result.values.Q).toBeCloseTo(0.773, 2);
expect(p.children[i].result.values.QA).toBeCloseTo(0, 2);
// Cote radier amont
expect(p.children[i].result.extraResults.ZRAM).toBeCloseTo(73.665 + (13 - i) * 0.23, 2);
expect(p.children[i].result.values.ZRAM).toBeCloseTo(73.665 + (13 - i) * 0.23, 2);
// Cote radier mi-bassin
expect(p.children[i].result.extraResults.ZRMB).toBeCloseTo(73.550 + (13 - i) * 0.23, 2);
expect(p.children[i].result.extraResults.x).toBeCloseTo(3.1 * i, 2);
expect(p.children[i].result.values.ZRMB).toBeCloseTo(73.550 + (13 - i) * 0.23, 2);
expect(p.children[i].result.values.x).toBeCloseTo(3.1 * i, 2);
}
}
......@@ -230,7 +230,7 @@ describe("Class Pab: ", () => {
pab.CalcSerie();
// for ex. Cloisons n°1
expect(pab.children[0].result.resultElements.length).toBe(3);
expect(Object.keys(pab.children[0].result.resultElements[1].realExtraResults).length).toBe(8);
expect(Object.keys(pab.children[0].result.resultElements[1].extraResults).length).toBe(8);
});
});
......
......@@ -36,7 +36,7 @@ describe("Class PabNombre: ", () => {
nub.Calc("N", 0);
expect(nub.result.vCalc).toBe(9);
expect(nub.result.getExtraResult("DHR")).toBeCloseTo(0.3);
expect(nub.result.getValue("DHR")).toBeCloseTo(0.3);
});
it ("DHR should be 0", () => {
......@@ -50,7 +50,7 @@ describe("Class PabNombre: ", () => {
nub.Calc("N", 0);
expect(nub.result.vCalc).toBe(15);
expect(nub.result.getExtraResult("DHR")).toBe(0);
expect(nub.result.getValue("DHR")).toBe(0);
});
it ("non-integer number of basins should lead to log error entry", () => {
......
......@@ -50,7 +50,7 @@ describe("Class Remous / section rectangulaire :", () => {
75: 0.9962500000000004, 80: 0.9970000000000003, 85: 0.9977500000000002,
90: 0.9985000000000002, 95: 0.9992500000000001, 100: 1
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
expect(
......@@ -58,7 +58,7 @@ describe("Class Remous / section rectangulaire :", () => {
).toBeTruthy("la ligne d'eau torrentielle ne devrait comporter aucune valeur");
// const x = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -113,7 +113,7 @@ describe("Class Remous / section rectangulaire :", () => {
75: 0.7362499999999997, 80: 0.7299999999999998, 85: 0.7232499999999998,
90: 0.7159999999999999, 95: 0.7082499999999999, 100: 0.7
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
expect(
......@@ -121,7 +121,7 @@ describe("Class Remous / section rectangulaire :", () => {
).toBeTruthy("la ligne d'eau torrentielle ne devrait comporter aucune valeur");
// const x = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......
......@@ -70,15 +70,15 @@ describe("Class Remous / section rectangulaire :", () => {
95: 5.750000000000001,
100: 6
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// const x = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -131,7 +131,7 @@ describe("Class Remous / section rectangulaire :", () => {
// données de validation : version Typescript (Oct 2017) méthode des trapèzes
const f = {};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {
......@@ -157,11 +157,11 @@ describe("Class Remous / section rectangulaire :", () => {
95: 0.2527499999999999,
100: 0.253
}; // dernière valeur modifiée pour la raison en tête de fichier
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// const x = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -320,7 +320,7 @@ describe("Class Remous / section rectangulaire :", () => {
0.5: 0.7275000000000007,
0.25: 0.7132500000000007
}; // première valeur modifiée pour la raison en tête de fichier
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {
......@@ -341,12 +341,12 @@ describe("Class Remous / section rectangulaire :", () => {
3.5: 0.18550000000000003,
3.75: 0.9072500000000001
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -411,12 +411,12 @@ describe("Class Remous / section rectangulaire :", () => {
24: 0.2492500000000001, 25: 0.2502500000000001, 26: 0.25050000000000006, 27: 0.25075000000000003,
28: 0.251, 29: 0.25125, 30: 0.25149999999999995
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.01);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.01);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.01);
// const x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
// 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -569,12 +569,12 @@ describe("Class Remous / section rectangulaire :", () => {
9.900: 0.269,
10.000: 0.269
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 0.100, 0.200, 0.300, 0.400, 0.500, 0.600, 0.700, 0.800, 0.900, 1.000, 1.100, 1.200, 1.300, 1.400, 1.500, 1.600, 1.700, 1.800, 1.900, 2.000, 2.100, 2.200, 2.300, 2.400, 2.500, 2.600, 2.700, 2.800, 2.900, 3.000, 3.100, 3.200, 3.300, 3.400, 3.500, 3.600, 3.700, 3.800, 3.900, 4.000, 4.100, 4.200, 4.300, 4.400, 4.500, 4.600, 4.700, 4.800, 4.900, 5.000, 5.100, 5.200, 5.300, 5.400, 5.500, 5.600, 5.700, 5.800, 5.900, 6.000, 6.100, 6.200, 6.300, 6.400, 6.500, 6.600, 6.700, 6.800, 6.900, 7.000, 7.100, 7.200, 7.300, 7.400, 7.500, 7.600, 7.700, 7.800, 7.900, 8.000, 8.100, 8.200, 8.300, 8.400, 8.500, 8.600, 8.700, 8.800, 8.900, 9.000, 9.100, 9.200, 9.300, 9.400, 9.500, 9.600, 9.700, 9.800, 9.900, 10.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......
......@@ -45,16 +45,16 @@ describe("Class Remous / section rectangulaire :", () => {
40.000: 0.89, 35.000: 0.891, 30.000: 0.892, 25.000: 0.893, 20.000: 0.894, 15.000: 0.895,
10.000: 0.896, 5.000: 0.897, 0.000: 0.898
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000,
// 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -134,17 +134,17 @@ describe("Class Remous / section rectangulaire :", () => {
10.000: 0.755,
5.000: 0.76
}; // dernière valeur supprimée pour la raison en tête de fichier
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
// let t = { 0.000: 0.15, 5.000: 0.76 };
const t = { 0.000: 0.15 }; // dernière valeur supprimée pour la raison en tête de fichier
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -223,16 +223,16 @@ describe("Class Remous / section rectangulaire :", () => {
0.250: 0.509,
0.000: 0.01
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = { 0.000: 0.01, 0.250: 0.017, 0.500: 0.022, 0.750: 0.028, 1.000: 0.502 };
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 0.250, 0.500, 0.750, 1.000, 1.250, 1.500, 1.750, 2.000, 2.250, 2.500, 2.750, 3.000, 3.250, 3.500, 3.750, 4.000, 4.250, 4.500, 4.750, 5.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -306,7 +306,7 @@ describe("Class Remous / section rectangulaire :", () => {
5.000: 0.989,
0.000: 0.988
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
expect(extraResultLength(res, "tor") === 0)
......@@ -314,7 +314,7 @@ describe("Class Remous / section rectangulaire :", () => {
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -383,7 +383,7 @@ describe("Class Remous / section rectangulaire :", () => {
5.000: 0.802,
0.000: 0.806
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
expect(extraResultLength(res, "tor") === 0)
......@@ -391,7 +391,7 @@ describe("Class Remous / section rectangulaire :", () => {
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......
......@@ -72,16 +72,16 @@ describe("Class Remous / section rectangulaire :", () => {
5.000: 1.237,
0.000: 0.977
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.01);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.01);
compareExtraResult("Yfluvial", res, "flu", f, 0.01);
const t = {};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -134,7 +134,7 @@ describe("Class Remous / section rectangulaire :", () => {
// données de validation : version PHP (Oct 2017) méthode RungeKutta4
const f = {};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
// tslint:disable-next-line:max-line-length
......@@ -162,12 +162,12 @@ describe("Class Remous / section rectangulaire :", () => {
95.000: 0.253,
100.000: 0.253
}; // dernière valeur remplacée pour la raison 1 en tête de fichier
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -225,7 +225,7 @@ describe("Class Remous / section rectangulaire :", () => {
// let f = { 100.000: 1, 95.000: 0.728, 90.000: 0.521 };
const f = { 100.000: 1, 95.000: 0.728 }; // dernière valeur supprimée pour la raison 2 en tête de fichier
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
// tslint:disable-next-line:max-line-length
......@@ -251,12 +251,12 @@ describe("Class Remous / section rectangulaire :", () => {
85.000: 0.253,
90.000: 0.25
}; // dernière valeur remplacée pour la raison 1 en tête de fichier
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -339,7 +339,7 @@ describe("Class Remous / section rectangulaire :", () => {
0.250: 0.713,
0.000: 0.699
}; // dernière valeur remplacée pour la raison 1 en tête de fichier
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {
......@@ -360,12 +360,12 @@ describe("Class Remous / section rectangulaire :", () => {
3.500: 0.186,
3.750: 0.907
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 0.250, 0.500, 0.750, 1.000, 1.250, 1.500, 1.750, 2.000, 2.250, 2.500, 2.750, 3.000, 3.250, 3.500, 3.750, 4.000, 4.250, 4.500, 4.750, 5.000, 5.250, 5.500];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -443,12 +443,12 @@ describe("Class Remous / section rectangulaire :", () => {
95.000: 0.253,
100.000: 0.253
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.01);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.01);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.01);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -601,12 +601,12 @@ describe("Class Remous / section rectangulaire :", () => {
9.900: 0.26,
10.000: 0.26
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.01);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.01);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.01);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 0.100, 0.200, 0.300, 0.400, 0.500, 0.600, 0.700, 0.800, 0.900, 1.000, 1.100, 1.200, 1.300, 1.400, 1.500, 1.600, 1.700, 1.800, 1.900, 2.000, 2.100, 2.200, 2.300, 2.400, 2.500, 2.600, 2.700, 2.800, 2.900, 3.000, 3.100, 3.200, 3.300, 3.400, 3.500, 3.600, 3.700, 3.800, 3.900, 4.000, 4.100, 4.200, 4.300, 4.400, 4.500, 4.600, 4.700, 4.800, 4.900, 5.000, 5.100, 5.200, 5.300, 5.400, 5.500, 5.600, 5.700, 5.800, 5.900, 6.000, 6.100, 6.200, 6.300, 6.400, 6.500, 6.600, 6.700, 6.800, 6.900, 7.000, 7.100, 7.200, 7.300, 7.400, 7.500, 7.600, 7.700, 7.800, 7.900, 8.000, 8.100, 8.200, 8.300, 8.400, 8.500, 8.600, 8.700, 8.800, 8.900, 9.000, 9.100, 9.200, 9.300, 9.400, 9.500, 9.600, 9.700, 9.800, 9.900, 10.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......
......@@ -70,16 +70,16 @@ describe("Class Remous / section rectangulaire :", () => {
5.000: 0.75,
0.000: 0.755
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -159,17 +159,17 @@ describe("Class Remous / section rectangulaire :", () => {
10.000: 0.744,
5.000: 0.75
}; // dernière valeur supprimée pour la raison en tête de fichier
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
// let t = { 0.000: 0.15, 5.000: 0.75 };
const t = { 0.000: 0.15 }; // dernière valeur supprimée pour la raison en tête de fichier
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -264,16 +264,16 @@ describe("Class Remous / section rectangulaire :", () => {
0.250: 0.508,
0.000: 0.01
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = { 0.000: 0.01, 0.250: 0.022, 0.500: 0.027, 0.750: 0.033, 1.000: 0.501 };
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.000, 0.250, 0.500, 0.750, 1.000, 1.250, 1.500, 1.750, 2.000, 2.250, 2.500, 2.750, 3.000, 3.250, 3.500, 3.750, 4.000, 4.250, 4.500, 4.750, 5.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -428,7 +428,7 @@ describe("Class Remous / section rectangulaire :", () => {
0.0500: 0.51,
0.0000: 0.01
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
const t = {
......@@ -452,12 +452,12 @@ describe("Class Remous / section rectangulaire :", () => {
0.8500: 0.03,
0.9000: 0.502
};
// compareObject("Ytorrentiel", res.getExtraResult("tor"), t, 0.03);
// compareObject("Ytorrentiel", res.getValue("tor"), t, 0.03);
compareExtraResult("Ytorrentiel", res, "tor", t, 0.03);
// tslint:disable-next-line:max-line-length
// const x = [0.0000, 0.0500, 0.1000, 0.1500, 0.2000, 0.2500, 0.3000, 0.3500, 0.4000, 0.4500, 0.5000, 0.5500, 0.6000, 0.6500, 0.7000, 0.7500, 0.8000, 0.8500, 0.9000, 0.9500, 1.0000, 1.0500, 1.1000, 1.1500, 1.2000, 1.2500, 1.3000, 1.3500, 1.4000, 1.4500, 1.5000, 1.5500, 1.6000, 1.6500, 1.7000, 1.7500, 1.8000, 1.8500, 1.9000, 1.9500, 2.0000, 2.0500, 2.1000, 2.1500, 2.2000, 2.2500, 2.3000, 2.3500, 2.4000, 2.4500, 2.5000, 2.5500, 2.6000, 2.6500, 2.7000, 2.7500, 2.8000, 2.8500, 2.9000, 2.9500, 3.0000, 3.0500, 3.1000, 3.1500, 3.2000, 3.2500, 3.3000, 3.3500, 3.4000, 3.4500, 3.5000, 3.5500, 3.6000, 3.6500, 3.7000, 3.7500, 3.8000, 3.8500, 3.9000, 3.9500, 4.0000, 4.0500, 4.1000, 4.1500, 4.2000, 4.2500, 4.3000, 4.3500, 4.4000, 4.4500, 4.5000, 4.5500, 4.6000, 4.6500, 4.7000, 4.7500, 4.8000, 4.8500, 4.9000, 4.9500, 5.0000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);
const expLog = new cLog();
let m = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
......@@ -532,7 +532,7 @@ describe("Class Remous / section rectangulaire :", () => {
5.000: 0.988,
0.000: 0.988
};
// compareObject("Yfluvial", res.getExtraResult("flu"), f, 0.03);
// compareObject("Yfluvial", res.getValue("flu"), f, 0.03);
compareExtraResult("Yfluvial", res, "flu", f, 0.03);
expect(extraResultLength(res, "tor") === 0)
......@@ -540,7 +540,7 @@ describe("Class Remous / section rectangulaire :", () => {
// tslint:disable-next-line:max-line-length
// const x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
// compareArray("abscisses", res.getExtraResult("trX"), x);
// compareArray("abscisses", res.getValue("trX"), x);