An error occurred while loading the file. Please try again.
-
Dorchies David authored
#38 Correction pour tests unitaires suite au changement d'initialisation de la dichotomie dans 99b9bef6
5499450d
import { LechaptCalmon, LechaptCalmonParams } from "../src/lechaptcalmon";
import { checkResult } from "./test_func";
let lechapt: LechaptCalmon;
let prms: LechaptCalmonParams;
describe("Class LechaptCalmon : ", () => {
describe("Calc() : ", () => {
it("Q should be 2.917", () => {
prms = new LechaptCalmonParams(undefined, // débit
1.2, // diamètre
0.6, /// perte de charge
100, // longueur du toyo
1.863, // paramètre L du matériau
2, // paramètre M du matériau
5.33// paramètre N du matériau
);
lechapt = new LechaptCalmon(prms);
checkResult(lechapt.Calc("Q", 0), 2.917);
});
it("D should be 1.213", () => {
prms = new LechaptCalmonParams(3, // débit
undefined, // diamètre
0.6, /// perte de charge
100, // longueur du toyo
1.863, // paramètre L du matériau
2, // paramètre M du matériau
5.33// paramètre N du matériau
);
lechapt = new LechaptCalmon(prms);
checkResult(lechapt.Calc("D", 0), 1.213);
});
it("J should be 0.634", () => {
prms = new LechaptCalmonParams(3, // débit
1.2, // diamètre
undefined, /// perte de charge
100, // longueur du toyo
1.863, // paramètre L du matériau
2, // paramètre M du matériau
5.33// paramètre N du matériau
);
lechapt = new LechaptCalmon(prms);
checkResult(lechapt.Calc("J", 0), 0.634);
});
it("Lg should be 94.565", () => {
prms = new LechaptCalmonParams(3, // débit
1.2, // diamètre
0.6, /// perte de charge
undefined, // longueur du toyo
1.863, // paramètre L du matériau
2, // paramètre M du matériau
5.33// paramètre N du matériau
);
lechapt = new LechaptCalmon(prms);
checkResult(lechapt.Calc("Lg", 0), 94.565);
});
});
});