Commit fbc1c2f0 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Update spec

Showing with 12 additions and 14 deletions
+12 -14
......@@ -15,17 +15,15 @@ describe("Class Jet", () => {
jet = newJet();
});
for (const p of jet.parameterIterator) {
if (p.symbol !== "Pr") {
it(`Calc(${p.symbol}) should return ${p.currentValue}`, () => {
jet.calculatedParam = jet.getParameter(p.symbol);
const ref: number = p.currentValue;
jet.calculatedParam.singleValue = jet.calculatedParam.singleValue / 10;
expect(jet.CalcSerie().vCalc).toBeCloseTo(ref, 3);
expect(jet.result.values.t).toBeCloseTo(4, 3);
expect(jet.result.values.Vx).toBeCloseTo(4.9978, 3);
expect(jet.result.values.Vz).toBeCloseTo(-39.0901, 3);
expect(jet.result.values.Vt).toBeCloseTo(39.4083, 3);
});
}
it(`Calc(${p.symbol}) should return ${p.currentValue}`, () => {
jet.calculatedParam = jet.getParameter(p.symbol);
const ref: number = p.currentValue;
jet.calculatedParam.singleValue = jet.calculatedParam.singleValue / 10;
expect(jet.CalcSerie().vCalc).toBeCloseTo(ref, 3);
expect(jet.result.values.t).toBeCloseTo(4, 3);
expect(jet.result.values.Vx).toBeCloseTo(4.9978, 3);
expect(jet.result.values.Vz).toBeCloseTo(-39.0901, 3);
expect(jet.result.values.Vt).toBeCloseTo(39.4083, 3);
});
}
});
......@@ -59,7 +59,7 @@ const calTypes =
).map((e) => +e);
function randomizeParameter(p: ParamDefinition) {
p.singleValue = Math.max(-1E-6, p.domain.minValue)
p.singleValue = Math.max(-1E6, p.domain.minValue)
+ Math.random()
* (
Math.min(1E6, p.domain.maxValue)
......@@ -147,7 +147,7 @@ SetJasmineCurrentSpec();
const nubs: Nub[] = [];
let iNub: number = 0;
let bHouston: boolean = false; // Houston, we have a problem...
let bHouston: boolean = true; // Houston, we have a problem...
describe("Fuzz testing", () => {
beforeAll(() => {
iNub = 0;
......
Supports Markdown
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