An error occurred while loading the file. Please try again.
-
Grand Francois authored
- classe Result : remplacement du membre _message par un cLog (ensemble de Message)
c3dab5cc
/// <reference path="../node_modules/@types/jasmine/index.d.ts" />
import { Result } from "../src/util/result";
import { equalEpsilon } from "./nubtest";
import { LechaptCalmonParams, LechaptCalmon } from "../src/lechaptcalmon"
let lechapt: LechaptCalmon;
let prms: LechaptCalmonParams;
function check(val1: Result, val2: number) {
expect(equalEpsilon(val1.vCalc, val2)).toBe(true);
}
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);
check(lechapt.Calc("Q"), 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);
check(lechapt.Calc("D"), 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);
check(lechapt.Calc("J"), 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);
check(lechapt.Calc("Lg"), 94.565);
});
717273
});
});