All files / output cl_abap_unit_assert.clas.mjs

51.24% Statements 226/441
54.16% Branches 39/72
9.09% Functions 10/110
51.24% Lines 226/441

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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 4411x 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 210x 210x 210x 210x 210x 210x 210x 210x 210x 210x 210x         210x 210x 210x 210x 210x 2x 4x 4x 4x 6x 6x 6x 4x 4x 6x 2x 2x     2x 6x 4x         4x 210x 208x 208x 208x 1006x 1006x 1006x 1006x 1006x 1006x 1006x 1006x 1006x 1006x 208x 208x 210x 1x     1x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x         5x 1x     1x               1x     1x 7x 7x 7x 7x 7x 7x 7x         7x 1x     1x 3x 3x 3x 3x 3x 3x 3x         3x 1x     1x 24x 24x 24x 24x 24x 24x 24x 24x 24x         24x 1x     1x                           1x     1x                     1x     1x         1x     1x                                         1x     1x                             1x     1x                             1x     1x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 4435x 3245x 3245x         3245x 4435x 1190x         1190x 4435x 210x 4435x             4225x       4225x 2x 2x 2x   2x 2x 2x 2x 2x 2x 2x 4435x 1x     1x 43x 43x 43x 43x 43x 43x 43x 43x 43x                 43x 43x 1x     1x 31x 31x 31x 31x 31x 31x 31x 31x                 31x 1x     1x 2132x 2132x 2132x 2132x 2132x 2132x 2132x 2132x 2132x 2132x 2132x 2132x 2132x                 2132x 1x     1x                                             1x 1x 1x
await import("./cl_abap_unit_assert.clas.locals.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_abap_unit_assert.clas.abap
class cl_abap_unit_assert {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_ABAP_UNIT_ASSERT';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"COMPARE_TABLES": {"visibility": "I", "parameters": {"ACT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "EXP": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}}},
  "ASSERT_EQUALS": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "EXP": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "TOL": {"type": () => {return new abap.types.Float({qualifiedName: "F"});}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ABORT": {"visibility": "U", "parameters": {"MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "DETAIL": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "INT1"});}, "is_optional": " "}}},
  "ASSERT_DIFFERS": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "EXP": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_NUMBER_BETWEEN": {"visibility": "U", "parameters": {"LOWER": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "UPPER": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "NUMBER": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_NOT_INITIAL": {"visibility": "U", "parameters": {"ASSERTION_FAILED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "ACT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_INITIAL": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "SKIP": {"visibility": "U", "parameters": {"MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "DETAIL": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "FAIL": {"visibility": "U", "parameters": {"MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "DETAIL": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "ASSERT_SUBRC": {"visibility": "U", "parameters": {"EXP": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "ACT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_TRUE": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_FALSE": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_CHAR_CP": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "EXP": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_CHAR_NP": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "EXP": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_BOUND": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_NOT_BOUND": {"visibility": "U", "parameters": {"ACT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ASSERT_TEXT_MATCHES": {"visibility": "U", "parameters": {"PATTERN": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "TEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "MSG": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "QUIT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "LEVEL": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async compare_tables(INPUT) {
    return cl_abap_unit_assert.compare_tables(INPUT);
  }
  static async compare_tables(INPUT) {
    let act = INPUT?.act;
    let exp = INPUT?.exp;
    let index = new abap.types.Integer({qualifiedName: "I"});
    let type1 = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"});
    let type2 = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"});
    let lv_match = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let fs_tab1_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_row1_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    let fs_tab2_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_row2_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    if (abap.compare.ne(abap.builtin.lines({val: act}), abap.builtin.lines({val: exp}))) {
      const unique1257 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Expected table to contain ${abap.templateFormatting(abap.builtin.lines({val: exp}))} rows, got ${abap.templateFormatting(abap.builtin.lines({val: act}))}`)});
      unique1257.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 164};
      throw unique1257;
    }
    abap.statements.assign({target: fs_tab1_, source: act});
    abap.statements.assign({target: fs_tab2_, source: exp});
    await abap.statements.cast(type1, (await abap.Classes['CL_ABAP_TYPEDESCR'].describe_by_data({p_data: act})));
    await abap.statements.cast(type2, (await abap.Classes['CL_ABAP_TYPEDESCR'].describe_by_data({p_data: exp})));
    if (abap.compare.eq(type1.get().table_kind, abap.Classes['CL_ABAP_TABLEDESCR'].tablekind_hashed) || abap.compare.eq(type2.get().table_kind, abap.Classes['CL_ABAP_TABLEDESCR'].tablekind_hashed)) {
      for await (const unique1258 of abap.statements.loop(fs_tab1_)) {
        fs_row1_.assign(unique1258);
        lv_match.set(abap.builtin.abap_false);
        for await (const unique1259 of abap.statements.loop(fs_tab2_)) {
          fs_row2_.assign(unique1259);
          try {
            await this.assert_equals({act: fs_row1_, exp: fs_row2_});
            lv_match.set(abap.builtin.abap_true);
            break;
          } catch (e) {
            if ((abap.Classes['KERNEL_CX_ASSERT'] && e instanceof abap.Classes['KERNEL_CX_ASSERT'])) {
            } else {
              throw e;
            }
          }
        }
        if (abap.compare.eq(lv_match, abap.builtin.abap_false)) {
          const unique1260 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Hashed table contents differs`)});
          unique1260.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 190};
          throw unique1260;
        }
      }
    } else {
      const indexBackup1 = abap.builtin.sy.get().index.get();
      const unique1261 = abap.builtin.lines({val: act}).get();
      for (let unique1262 = 0; unique1262 < unique1261; unique1262++) {
        abap.builtin.sy.get().index.set(unique1262 + 1);
        index.set(abap.builtin.sy.get().index);
        abap.statements.readTable(fs_tab1_,{index: index,
          assigning: fs_row1_});
        await this.assert_subrc();
        abap.statements.readTable(fs_tab2_,{index: index,
          assigning: fs_row2_});
        await this.assert_subrc();
        await this.assert_equals({act: fs_row1_, exp: fs_row2_});
      }
      abap.builtin.sy.get().index.set(indexBackup1);
    }
  }
  async assert_text_matches(INPUT) {
    return cl_abap_unit_assert.assert_text_matches(INPUT);
  }
  static async assert_text_matches(INPUT) {
    let pattern = INPUT?.pattern;
    let text = INPUT?.text;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let lv_match = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    lv_match.set(abap.builtin.boolc(abap.compare.eq(abap.builtin.contains({val: text, regex: pattern}), abap.builtin.abap_true)));
    if (abap.compare.eq(lv_match, abap.builtin.abap_false)) {
      const unique1263 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({expected: pattern, actual: text, msg: msg});
      unique1263.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 216};
      throw unique1263;
    }
  }
  async abort(INPUT) {
    return cl_abap_unit_assert.abort(INPUT);
  }
  static async abort(INPUT) {
    let msg = INPUT?.msg || new abap.types.Character();
    let detail = INPUT?.detail || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "INT1"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    if (INPUT === undefined || INPUT.quit === undefined) {quit = abap.IntegerFactory.get(2);}
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async assert_bound(INPUT) {
    return cl_abap_unit_assert.assert_bound(INPUT);
  }
  static async assert_bound(INPUT) {
    let act = INPUT?.act;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    if (abap.compare.initial(act)) {
      const unique1264 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Expected value to be bound`)});
      unique1264.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 230};
      throw unique1264;
    }
  }
  async assert_not_bound(INPUT) {
    return cl_abap_unit_assert.assert_not_bound(INPUT);
  }
  static async assert_not_bound(INPUT) {
    let act = INPUT?.act;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    if (abap.compare.initial(act) === false) {
      const unique1265 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Expected value to not be bound`)});
      unique1265.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 238};
      throw unique1265;
    }
  }
  async assert_char_cp(INPUT) {
    return cl_abap_unit_assert.assert_char_cp(INPUT);
  }
  static async assert_char_cp(INPUT) {
    let act = INPUT?.act;
    let exp = INPUT?.exp;
    let msg = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.msg) {msg.set(INPUT.msg);}
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    if (abap.compare.np(act, exp)) {
      const unique1266 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({expected: exp, actual: act, msg: msg});
      unique1266.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 246};
      throw unique1266;
    }
  }
  async assert_char_np(INPUT) {
    return cl_abap_unit_assert.assert_char_np(INPUT);
  }
  static async assert_char_np(INPUT) {
    let act = INPUT?.act;
    let exp = INPUT?.exp;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    if (abap.compare.cp(act, exp)) {
      const unique1267 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Actual: ${abap.templateFormatting(act)}`)});
      unique1267.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 256};
      throw unique1267;
    }
  }
  async fail(INPUT) {
    return cl_abap_unit_assert.fail(INPUT);
  }
  static async fail(INPUT) {
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let detail = INPUT?.detail || new abap.types.Character();
    const unique1268 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: msg});
    unique1268.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 263};
    throw unique1268;
  }
  async skip(INPUT) {
    return cl_abap_unit_assert.skip(INPUT);
  }
  static async skip(INPUT) {
    let msg = INPUT?.msg;
    let detail = INPUT?.detail || new abap.types.Character();
    return;
  }
  async assert_differs(INPUT) {
    return cl_abap_unit_assert.assert_differs(INPUT);
  }
  static async assert_differs(INPUT) {
    let act = INPUT?.act;
    let exp = INPUT?.exp;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    try {
      await this.assert_equals({act: act, exp: exp});
      const unique1269 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Expected different values`), actual: act, expected: exp});
      unique1269.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 277};
      throw unique1269;
    } catch (e) {
      if ((abap.Classes['KERNEL_CX_ASSERT'] && e instanceof abap.Classes['KERNEL_CX_ASSERT'])) {
        return;
      } else {
        throw e;
      }
    }
  }
  async assert_true(INPUT) {
    return cl_abap_unit_assert.assert_true(INPUT);
  }
  static async assert_true(INPUT) {
    let act = INPUT?.act;
    if (act?.getQualifiedName === undefined || act.getQualifiedName() !== "ABAP_BOOL") { act = undefined; }
    if (act === undefined) { act = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.act); }
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    if (abap.compare.ne(act, abap.builtin.abap_true)) {
      const unique1270 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Expected abap_true`)});
      unique1270.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 289};
      throw unique1270;
    }
  }
  async assert_false(INPUT) {
    return cl_abap_unit_assert.assert_false(INPUT);
  }
  static async assert_false(INPUT) {
    let act = INPUT?.act;
    if (act?.getQualifiedName === undefined || act.getQualifiedName() !== "ABAP_BOOL") { act = undefined; }
    if (act === undefined) { act = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.act); }
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    if (abap.compare.ne(act, abap.builtin.abap_false)) {
      const unique1271 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Expected abap_false`)});
      unique1271.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 297};
      throw unique1271;
    }
  }
  async assert_equals(INPUT) {
    return cl_abap_unit_assert.assert_equals(INPUT);
  }
  static async assert_equals(INPUT) {
    let act = INPUT?.act;
    let exp = INPUT?.exp;
    let msg = INPUT?.msg || new abap.types.Character();
    let tol = new abap.types.Float({qualifiedName: "F"});
    if (INPUT && INPUT.tol) {tol.set(INPUT.tol);}
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let type1 = new abap.types.Character(1, {});
    let type2 = new abap.types.Character(1, {});
    let diff = new abap.types.Float({qualifiedName: "F"});
    let lv_exp = new abap.types.String({qualifiedName: "STRING"});
    let lv_act = new abap.types.String({qualifiedName: "STRING"});
    let lv_msg = new abap.types.String({qualifiedName: "STRING"});
    let fs_act_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    let fs_exp_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    abap.statements.describe({field: act, type: type1});
    abap.statements.describe({field: exp, type: type2});
    if (abap.compare.ca(type1, abap.CharacterFactory.get(11, 'CgyIFPDTXN8'))) {
      if (abap.compare.initial(type2) === false) {
        if (abap.compare.na(type2, abap.CharacterFactory.get(11, 'CgyIFPDTXN8'))) {
          const unique1272 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Unexpected types`)});
          unique1272.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 321};
          throw unique1272;
        }
      }
    } else if (abap.compare.initial(type1) === false && abap.compare.initial(type2) === false) {
      if (abap.compare.ne(type1, type2)) {
        const unique1273 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: new abap.types.String().set(`Unexpected types`)});
        unique1273.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 329};
        throw unique1273;
      }
    }
    if (abap.compare.eq(type1, abap.CharacterFactory.get(1, 'h'))) {
      await this.compare_tables({act: act, exp: exp});
    } else if (INPUT && INPUT.tol) {
      diff.set(abap.operators.minus(exp,act));
      if (abap.compare.ge(diff, tol)) {
        const unique1274 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_();
        unique1274.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 344};
        throw unique1274;
      }
    } else if (abap.compare.eq(type1, abap.CharacterFactory.get(1, 'l'))) {
      abap.statements.assign({target: fs_act_, source: act.dereference()});
      abap.statements.assign({target: fs_exp_, source: exp.dereference()});
      await this.assert_equals({act: fs_act_, exp: fs_exp_});
    } else if (abap.compare.ne(act, exp)) {
      lv_act.set((await abap.Classes['CLAS-CL_ABAP_UNIT_ASSERT-LCL_DUMP'].to_string({iv_val: act})));
      lv_exp.set((await abap.Classes['CLAS-CL_ABAP_UNIT_ASSERT-LCL_DUMP'].to_string({iv_val: exp})));
      if (abap.compare.ne(msg, abap.CharacterFactory.get(1, ''))) {
        lv_msg.set(msg);
      } else {
        lv_msg.set(new abap.types.String().set(`Expected '${abap.templateFormatting(lv_exp)}', got '${abap.templateFormatting(lv_act)}'`));
      }
      const unique1275 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: lv_msg, actual: lv_act, expected: lv_exp});
      unique1275.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 360};
      throw unique1275;
    }
  }
  async assert_not_initial(INPUT) {
    return cl_abap_unit_assert.assert_not_initial(INPUT);
  }
  static async assert_not_initial(INPUT) {
    let assertion_failed = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let act = INPUT?.act;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let lv_msg = new abap.types.String({qualifiedName: "STRING"});
    if (abap.compare.initial(act)) {
      lv_msg.set(msg);
      if (abap.compare.initial(lv_msg)) {
        lv_msg.set(new abap.types.String().set(`Expected non initial value`));
      }
      const unique1276 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: lv_msg});
      unique1276.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 375};
      throw unique1276;
    }
    return assertion_failed;
  }
  async assert_initial(INPUT) {
    return cl_abap_unit_assert.assert_initial(INPUT);
  }
  static async assert_initial(INPUT) {
    let act = INPUT?.act;
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let lv_msg = new abap.types.String({qualifiedName: "STRING"});
    if (abap.compare.initial(act) === false) {
      lv_msg.set(msg);
      if (abap.compare.initial(lv_msg)) {
        lv_msg.set(new abap.types.String().set(`Expected initial value`));
      }
      const unique1277 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: lv_msg});
      unique1277.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 388};
      throw unique1277;
    }
  }
  async assert_subrc(INPUT) {
    return cl_abap_unit_assert.assert_subrc(INPUT);
  }
  static async assert_subrc(INPUT) {
    let exp = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.exp) {exp.set(INPUT.exp);}
    if (INPUT === undefined || INPUT.exp === undefined) {exp = abap.IntegerFactory.get(0);}
    let act = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.act) {act.set(INPUT.act);}
    if (INPUT === undefined || INPUT.act === undefined) {act = abap.builtin.sy.get().subrc;}
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let lv_msg = new abap.types.String({qualifiedName: "STRING"});
    if (abap.compare.ne(act, exp)) {
      lv_msg.set(msg);
      if (abap.compare.initial(lv_msg)) {
        lv_msg.set(new abap.types.String().set(`Expected sy-subrc to equal ${abap.templateFormatting(exp)}, got ${abap.templateFormatting(act)}`));
      }
      const unique1278 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: lv_msg});
      unique1278.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 401};
      throw unique1278;
    }
  }
  async assert_number_between(INPUT) {
    return cl_abap_unit_assert.assert_number_between(INPUT);
  }
  static async assert_number_between(INPUT) {
    let lower = INPUT?.lower;
    if (lower?.getQualifiedName === undefined || lower.getQualifiedName() !== "I") { lower = undefined; }
    if (lower === undefined) { lower = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.lower); }
    let upper = INPUT?.upper;
    if (upper?.getQualifiedName === undefined || upper.getQualifiedName() !== "I") { upper = undefined; }
    if (upper === undefined) { upper = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.upper); }
    let number = INPUT?.number;
    if (number?.getQualifiedName === undefined || number.getQualifiedName() !== "I") { number = undefined; }
    if (number === undefined) { number = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.number); }
    let msg = INPUT?.msg || new abap.types.Character();
    let quit = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.quit) {quit.set(INPUT.quit);}
    let level = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level) {level.set(INPUT.level);}
    let lv_msg = new abap.types.String({qualifiedName: "STRING"});
    if (abap.compare.lt(number, lower) || abap.compare.gt(number, upper)) {
      lv_msg.set(msg);
      const unique1279 = await (new abap.Classes['KERNEL_CX_ASSERT']()).constructor_({msg: lv_msg});
      unique1279.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_unit_assert.clas.abap","INTERNAL_LINE": 412};
      throw unique1279;
    }
  }
}
abap.Classes['CL_ABAP_UNIT_ASSERT'] = cl_abap_unit_assert;
export {cl_abap_unit_assert};