param_equation.spec.ts 879 bytes
/// <reference path="../../node_modules/@types/jasmine/index.d.ts" />
import { ConduiteDistribParams, ConduiteDistrib } from "../../src/cond_distri";
import { ParamDefinition } from "../../src/param";
describe("iterator ConduiteDistribParams : ", () => {
    it("test 1", () => {
        const cdp: ConduiteDistribParams = new ConduiteDistribParams(1, 2, 3, 4, 5)
        let n = 0;
        for (let p of cdp) {
            n++;
            expect(p.v == n);
        expect(n === 5);
    });
    it("test 2", () => {
        const cdp: ConduiteDistribParams = new ConduiteDistribParams(1, 2, 3, 4, 5)
        const symbs = ["Q", "D", "J", "Lg", "Nu"];
        let n = 0;
        for (const p of cdp.iterator) {
            expect(p.v == n + 1);
            expect(p.symbol == symbs[n]);
            n++;
        expect(n === 5).toBeTruthy();
    });
});