/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import assert from 'assert';
let a = 1;
for (let l = 0; l < 10; l += 1)
    for (a; a < l; a++) {
        let m = a;
        while (0 < m) {
            m--;
        }
        assert(m === 0);
    }
assert(a === 9);
let check = ["01", "11", "21", "02", "12", "22", "03", "13", "23"];
let g = 0;
for (const j of [1, 2, 3]) {
    for (const k in [1, j, 3]) {
        assert(k + j === check[g++]);
    }
}
check = ["xa", "i3a", "xb", "i3b"];
g = 0;
let h = { a: 1, b: 2 };
for (var i3 in h) {
    for (var i in { x: i3, i3: 0 }) {
        i;
        assert(i + i3 === check[g++]);
    }
}
do {
    a++;
    do {
        a++;
    } while (10 > a);
} while (a < 10);
assert(a === 11);
while (a > 0) {
    a--;
    while (0 < a) {
        a--;
    }
}
assert(a === 0);
