All files / src/comb cmps.ts

30% Statements 3/10
0% Branches 0/4
0% Functions 0/5
22.22% Lines 2/9

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 298x                                                       8x
import {stde} from '../stde';
 
class Cmps extends stde {
    constructor(in1_count: number, in2_count: number, preffix_in1?: string, preffix_in2?: string) {
        let in_count = Math.max(in1_count, in2_count);
        super(
            'CMPS',
            [
                ...Array.from({length: in1_count}, (_, index) =>
                    preffix_in1 ? preffix_in1 : 'A_' + String(index + 1)
                ),
                ...Array.from({length: in2_count}, (_, index) =>
                    preffix_in2 ? preffix_in2 : 'B_' + String(index + 1)
                )
            ],
            in_count + 1,
            (a) => {
                return a;
            }
        );
        this.style.preffix_name_out_connection = '$out_';
    }
}
 
function cmps(in1_count: number, in2_count: number, preffix_in1?: string, preffix_in2?: string) {
    return new Cmps(in1_count, in2_count, preffix_in1, preffix_in2);
}
 
export {Cmps, cmps};