All files / test/Ice/objects InitialI.js

88.32% Statements 174/197
83.72% Branches 36/43
79.54% Functions 35/44
88.32% Lines 174/197

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 1981x 1x 1x 1x 1x 1x 18x 18x 1x     1x 1x 1x 9x 9x 1x     1x 1x 1x 2x 2x 1x     1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x     1x 1x 1x 51x 51x   51x   51x   51x   51x   51x   51x   51x 51x 51x 51x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x     1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
// Copyright (c) ZeroC, Inc.
import { Ice } from "@zeroc/ice";
import { Test } from "./Test.js";
import { Test as Test_Forward } from "./Forward.js";
class BI extends Test.B {
    ice_preMarshal() {
        this.preMarshalInvoked = true;
    }
    ice_postUnmarshal() {
        this.postUnmarshalInvoked = true;
    }
}
class CI extends Test.C {
    ice_preMarshal() {
        this.preMarshalInvoked = true;
    }
    ice_postUnmarshal() {
        this.postUnmarshalInvoked = true;
    }
}
class DI extends Test.D {
    ice_preMarshal() {
        this.preMarshalInvoked = true;
    }
    ice_postUnmarshal() {
        this.postUnmarshalInvoked = true;
    }
}
class EI extends Test.E {
    constructor() {
        super(1, "hello");
    }
    checkValues() {
        return this.i == 1 && this.s == "hello";
    }
}
class FI extends Test.F {
    constructor(e) {
        super(e, e);
    }
    checkValues() {
        return this.e1 !== null && this.e1 === this.e2;
    }
}
export class CustomSliceLoader {
    newInstance(typeId) {
        switch (typeId) {
            case "::Test::B":
                return new BI();
            case "::Test::C":
                return new CI();
            case "::Test::D":
                return new DI();
            case "::Test::E":
                return new EI();
            case "::Test::F":
                return new FI();
            case "::Test::Inner::A":
                return new Test.Inner.A();
            case "::Test::Inner::Sub::A":
                return new Test.Inner.Sub.A();
            default:
                return null;
        }
    }
}
export class InitialI extends Test.Initial {
    constructor() {
        super();
        this._b1 = new BI();
        this._b2 = new BI();
        this._c = new CI();
        this._d = new DI();
        this._e = new EI();
        this._f = new FI(this._e);
        this._b1.theA = this._b2; // Cyclic reference to another B
        this._b1.theB = this._b1; // Self reference.
        this._b1.theC = null; // Null reference.
        this._b2.theA = this._b2; // Self reference, using base.
        this._b2.theB = this._b1; // Cyclic reference to another B
        this._b2.theC = this._c; // Cyclic reference to a C.
        this._c.theB = this._b2; // Cyclic reference to a B.
        this._d.theA = this._b1; // Reference to a B.
        this._d.theB = this._b2; // Reference to a B.
        this._d.theC = null; // Reference to a C.
    }
    getAll(_) {
        this._b1.preMarshalInvoked = false;
        this._b2.preMarshalInvoked = false;
        this._c.preMarshalInvoked = false;
        this._d.preMarshalInvoked = false;
        return [this._b1, this._b2, this._c, this._d];
    }
    opRenamedClass(r, _) {
        return r;
    }
    getB1(_) {
        this._b1.preMarshalInvoked = false;
        this._b2.preMarshalInvoked = false;
        this._c.preMarshalInvoked = false;
        return this._b1;
    }
    getB2(_) {
        this._b1.preMarshalInvoked = false;
        this._b2.preMarshalInvoked = false;
        this._c.preMarshalInvoked = false;
        return this._b2;
    }
    getC(_) {
        this._b1.preMarshalInvoked = false;
        this._b2.preMarshalInvoked = false;
        this._c.preMarshalInvoked = false;
        return this._c;
    }
    getD(_) {
        this._b1.preMarshalInvoked = false;
        this._b2.preMarshalInvoked = false;
        this._c.preMarshalInvoked = false;
        this._d.preMarshalInvoked = false;
        return this._d;
    }
    getE(_) {
        return this._e;
    }
    getF(_) {
        return this._f;
    }
    setRecursive(_r, _) { }
    setCycle(_r, _) { }
    acceptsClassCycles(_) {
        return true;
    }
    getMB(_) {
        return this._b1;
    }
    getAMDMB(_) {
        return Ice.Promise.resolve(this._b1);
    }
    getK(_) {
        return new Test.K(new Test.L("l"));
    }
    opValue(v1, _) {
        return [v1, v1];
    }
    opValueSeq(v1, _) {
        return [v1, v1];
    }
    opValueMap(v1, _) {
        return [v1, v1];
    }
    getD1(d1, _) {
        return d1;
    }
    throwEDerived(_) {
        throw new Test.EDerived(new Test.A1("a1"), new Test.A1("a2"), new Test.A1("a3"), new Test.A1("a4"));
    }
    setG(_theG, _) { }
    opBaseSeq(inS, _) {
        return [inS, inS];
    }
    getCompact(_) {
        return new Test.CompactExt();
    }
    getInnerA(_) {
        return new Test.Inner.A(this._b1);
    }
    getInnerSubA(_) {
        return new Test.Inner.Sub.A(new Test.Inner.A(this._b1));
    }
    throwInnerEx(_) {
        throw new Test.Inner.Ex("Inner::Ex");
    }
    throwInnerSubEx(_) {
        throw new Test.Inner.Sub.Ex("Inner::Sub::Ex");
    }
    opM(v1, _) {
        return [v1, v1];
    }
    opF1(f11, _) {
        return [f11, new Test_Forward.F1("F12")];
    }
    opF2(f21, current) {
        return [f21, Test_Forward.F2Prx.uncheckedCast(current.adapter.getCommunicator().stringToProxy("F22"))];
    }
    opF3(f31, current) {
        return [
            f31,
            new Test.F3(new Test_Forward.F1("F12"), new Test_Forward.F2Prx(current.adapter.getCommunicator(), "F22")),
        ];
    }
    hasF3(_) {
        return true;
    }
    shutdown(current) {
        current.adapter.getCommunicator().shutdown();
    }
}