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 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x 6x 6x 6x 1x 1x 1x 1x 1x 1x 10x 10x 10x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 144x 144x 144x 1x 1x 1x 1x 112x 112x 112x 1x 1x 1x 1x 24x 24x 24x 1x 1x 1x 1x 8x 8x 8x 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 1x 1x | const {zcl_abapgit_zlib_huffman} = await import("./zcl_abapgit_zlib_huffman.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_zlib_huffman.clas.testclasses.abap
class ltcl_test {
static STATIC_SUPER = undefined;
static INTERNAL_TYPE = 'CLAS';
static INTERNAL_NAME = 'CLAS-ZCL_ABAPGIT_ZLIB_HUFFMAN-LTCL_TEST';
static IMPLEMENTED_INTERFACES = [];
static ATTRIBUTES = {};
static METHODS = {"CREATE1": {"visibility": "I", "parameters": {}},
"CREATE2": {"visibility": "I", "parameters": {}},
"CREATE3": {"visibility": "I", "parameters": {}},
"CREATE4": {"visibility": "I", "parameters": {}},
"CREATE_WITH_ZEROS": {"visibility": "I", "parameters": {}},
"GET_COUNT_BOUNDARIES": {"visibility": "I", "parameters": {}}};
constructor() {
this.me = new abap.types.ABAPObject();
this.me.set(this);
this.INTERNAL_ID = abap.internalIdCounter++;
this.FRIENDS_ACCESS_INSTANCE = {
"create1": this.#create1.bind(this),
"create2": this.#create2.bind(this),
"create3": this.#create3.bind(this),
"create4": this.#create4.bind(this),
"create_with_zeros": this.#create_with_zeros.bind(this),
"get_count_boundaries": this.#get_count_boundaries.bind(this),
};
}
async constructor_(INPUT) {
if (super.constructor_) { await super.constructor_(INPUT); }
return this;
}
async #create1() {
let lo_huffman = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_HUFFMAN", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_HUFFMAN"});
let lt_lengths = abap.types.TableFactory.construct(new abap.types.Integer({qualifiedName: "I"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_zlib_huffman=>ty_lengths");
const indexBackup1 = abap.builtin.sy.get().index.get();
const unique476 = abap.IntegerFactory.get(10).get();
for (let unique477 = 0; unique477 < unique476; unique477++) {
abap.builtin.sy.get().index.set(unique477 + 1);
abap.statements.append({source: abap.IntegerFactory.get(8), target: lt_lengths});
}
abap.builtin.sy.get().index.set(indexBackup1);
lo_huffman.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_HUFFMAN']()).constructor_({it_lengths: lt_lengths}));
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(8)})), exp: abap.IntegerFactory.get(10)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(10)})), exp: abap.IntegerFactory.get(9)});
}
async #create2() {
let lo_huffman = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_HUFFMAN", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_HUFFMAN"});
let lt_lengths = abap.types.TableFactory.construct(new abap.types.Integer({qualifiedName: "I"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_zlib_huffman=>ty_lengths");
const indexBackup1 = abap.builtin.sy.get().index.get();
const unique478 = abap.IntegerFactory.get(144).get();
for (let unique479 = 0; unique479 < unique478; unique479++) {
abap.builtin.sy.get().index.set(unique479 + 1);
abap.statements.append({source: abap.IntegerFactory.get(8), target: lt_lengths});
}
abap.builtin.sy.get().index.set(indexBackup1);
const indexBackup2 = abap.builtin.sy.get().index.get();
const unique480 = abap.IntegerFactory.get(112).get();
for (let unique481 = 0; unique481 < unique480; unique481++) {
abap.builtin.sy.get().index.set(unique481 + 1);
abap.statements.append({source: abap.IntegerFactory.get(9), target: lt_lengths});
}
abap.builtin.sy.get().index.set(indexBackup2);
const indexBackup3 = abap.builtin.sy.get().index.get();
const unique482 = abap.IntegerFactory.get(24).get();
for (let unique483 = 0; unique483 < unique482; unique483++) {
abap.builtin.sy.get().index.set(unique483 + 1);
abap.statements.append({source: abap.IntegerFactory.get(7), target: lt_lengths});
}
abap.builtin.sy.get().index.set(indexBackup3);
const indexBackup4 = abap.builtin.sy.get().index.get();
const unique484 = abap.IntegerFactory.get(8).get();
for (let unique485 = 0; unique485 < unique484; unique485++) {
abap.builtin.sy.get().index.set(unique485 + 1);
abap.statements.append({source: abap.IntegerFactory.get(8), target: lt_lengths});
}
abap.builtin.sy.get().index.set(indexBackup4);
lo_huffman.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_HUFFMAN']()).constructor_({it_lengths: lt_lengths}));
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(8)})), exp: abap.IntegerFactory.get(152)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(15)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(1)})), exp: new abap.types.Integer().set(256)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: new abap.types.Integer().set(288)})), exp: new abap.types.Integer().set(255)});
}
async #create3() {
let lo_huffman = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_HUFFMAN", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_HUFFMAN"});
let lt_lengths = abap.types.TableFactory.construct(new abap.types.Integer({qualifiedName: "I"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_zlib_huffman=>ty_lengths");
abap.statements.append({source: abap.IntegerFactory.get(1), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(1), target: lt_lengths});
lo_huffman.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_HUFFMAN']()).constructor_({it_lengths: lt_lengths}));
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(2)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(2)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(2)})), exp: abap.IntegerFactory.get(1)});
}
async #create4() {
let lo_huffman = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_HUFFMAN", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_HUFFMAN"});
let lt_lengths = abap.types.TableFactory.construct(new abap.types.Integer({qualifiedName: "I"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_zlib_huffman=>ty_lengths");
abap.statements.append({source: abap.IntegerFactory.get(1), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(2), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(3), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(3), target: lt_lengths});
lo_huffman.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_HUFFMAN']()).constructor_({it_lengths: lt_lengths}));
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(1)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(2)})), exp: abap.IntegerFactory.get(1)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(3)})), exp: abap.IntegerFactory.get(2)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(4)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(2)})), exp: abap.IntegerFactory.get(1)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(3)})), exp: abap.IntegerFactory.get(2)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(4)})), exp: abap.IntegerFactory.get(3)});
}
async #create_with_zeros() {
let lo_huffman = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_HUFFMAN", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_HUFFMAN"});
let lt_lengths = abap.types.TableFactory.construct(new abap.types.Integer({qualifiedName: "I"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_zlib_huffman=>ty_lengths");
abap.statements.append({source: abap.IntegerFactory.get(0), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(1), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(0), target: lt_lengths});
abap.statements.append({source: abap.IntegerFactory.get(1), target: lt_lengths});
lo_huffman.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_HUFFMAN']()).constructor_({it_lengths: lt_lengths}));
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(2)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(1)})), exp: abap.IntegerFactory.get(1)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_symbol({iv_index: abap.IntegerFactory.get(2)})), exp: abap.IntegerFactory.get(3)});
}
async #get_count_boundaries() {
let lo_huffman = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_HUFFMAN", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_HUFFMAN"});
let lt_lengths = abap.types.TableFactory.construct(new abap.types.Integer({qualifiedName: "I"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_zlib_huffman=>ty_lengths");
abap.statements.append({source: abap.IntegerFactory.get(8), target: lt_lengths});
lo_huffman.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_HUFFMAN']()).constructor_({it_lengths: lt_lengths}));
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(0)})), exp: abap.IntegerFactory.get(0)});
await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await lo_huffman.get().get_count({iv_index: abap.IntegerFactory.get(16)})), exp: abap.IntegerFactory.get(0)});
}
}
abap.Classes['CLAS-ZCL_ABAPGIT_ZLIB_HUFFMAN-LTCL_TEST'] = ltcl_test;
export {ltcl_test}; |