diff --git a/packages/canyon-data/package.json b/packages/canyon-data/package.json index 53021b80..16ee9d0d 100755 --- a/packages/canyon-data/package.json +++ b/packages/canyon-data/package.json @@ -1,6 +1,6 @@ { "name": "canyon-data", - "version": "0.1.1-alpha.11", + "version": "0.1.1-alpha.12", "type": "module", "main": "dist/canyon-data.cjs", "module": "dist/canyon-data.js", @@ -17,7 +17,7 @@ "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-lib-source-maps": "^4.0.4", "@types/node": "^22.8.2", - "@vitest/coverage-v8": "^2.1.4", + "@vitest/coverage-istanbul": "*", "typescript": "^5.6.3", "vite": "^5.4.10", "vite-plugin-dts": "^4.3.0", @@ -27,4 +27,4 @@ "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-source-maps": "^5.0.6" } -} \ No newline at end of file +} diff --git a/packages/canyon-data/src/utils/line.ts b/packages/canyon-data/src/utils/line.ts index f4186233..90a8d7e5 100755 --- a/packages/canyon-data/src/utils/line.ts +++ b/packages/canyon-data/src/utils/line.ts @@ -24,17 +24,65 @@ function getLineCoverage(statementMap:{ [key: string]: Range },s:{ [key: string] export function calculateNewLineCoverageForSingleFile(coverage:FileCoverageData, newLine:number[]) { - const lineStats = getLineCoverage(coverage.statementMap,coverage.s); - const rows:[string,unknown][] = []; - Object.entries(lineStats).forEach(([lineNumber, count]) => { - if (newLine.includes(Number(lineNumber))) { - rows.push([lineNumber, count]); - } - }); - return { - total: newLine.length, - covered: newLine.length - rows.filter((i) => !i[1]).length, + +/* 变更行覆盖率计算 +1. 遍历变更行,判断是否在s、f、b中 +2. 如果在其中,只统计这部分行的覆盖率 +3. 在其中,且他们的hit大于0,就是覆盖的 +*/ + + const newLineResult = [] + for (let i = 0; i < newLine.length; i++) { + const line = newLine[i]; + + let isCovered = false + let isLand = false + + Object.keys(coverage.statementMap).forEach((key) => { + const statementRange = coverage.statementMap[key]; + if (statementRange.start.line <= line && statementRange.end.line >= line) { + isLand = true + if ( coverage.s[key] > 0){ + isCovered = true + } + } + }); + + Object.keys(coverage.fnMap).forEach((key) => { + const fnRange = coverage.fnMap[key]; + if (fnRange.decl.start.line <= line && fnRange.decl.end.line >= line) { + isLand = true + if (coverage.f[key] > 0) { + isCovered = true + } + } + }); + + Object.keys(coverage.branchMap).forEach((key) => { + const branchRange = coverage.branchMap[key]; + branchRange.locations.forEach((location,index) => { + if (location.start.line <= line && location.end.line >= line) { + isLand = true + if (coverage.b[key][index] > 0){ + isCovered = true + } + } + }); + }); + newLineResult.push({ + line, + covered: isCovered, + isLand + }) + } + + const newLineResultIsLand = newLineResult.filter((l) => l.isLand) + + const result = { + total: newLineResultIsLand.length, + covered: newLineResultIsLand.filter((l) => l.covered).length, skipped: 0, - pct: percent(newLine.length - rows.filter((i) => !i[1]).length, newLine.length) - }; + pct: percent(newLineResultIsLand.filter((l) => l.covered).length, newLineResultIsLand.length) + } + return result } diff --git a/packages/canyon-data/src/utils/test/mock.json b/packages/canyon-data/src/utils/test/mock.json new file mode 100644 index 00000000..f6286edc --- /dev/null +++ b/packages/canyon-data/src/utils/test/mock.json @@ -0,0 +1,5256 @@ +{ + "path": "src/pages/flightList/index.tsx", + "b": { + "0": [ + 1, + 0, + 0, + 0 + ], + "1": [ + 0, + 0 + ], + "2": [ + 0, + 0 + ], + "3": [ + 0 + ], + "4": [ + 0 + ], + "5": [ + 0 + ], + "6": [ + 0 + ], + "7": [ + 0 + ], + "8": [ + 0 + ], + "9": [ + 0 + ], + "10": [ + 0, + 0 + ], + "11": [ + 0, + 0 + ], + "12": [ + 0, + 0 + ], + "13": [ + 0, + 0 + ], + "14": [ + 0, + 0 + ], + "15": [ + 0, + 0 + ], + "16": [ + 0, + 0 + ], + "17": [ + 0, + 0 + ], + "18": [ + 0, + 0 + ], + "19": [ + 0, + 0 + ], + "20": [ + 0, + 0 + ], + "21": [ + 0, + 0 + ], + "22": [ + 0, + 0 + ], + "23": [ + 0, + 0 + ], + "24": [ + 0, + 0 + ], + "25": [ + 0, + 0 + ], + "26": [ + 0, + 0 + ], + "27": [ + 0, + 0 + ], + "28": [ + 0, + 0 + ], + "29": [ + 0, + 0, + 0 + ], + "30": [ + 0, + 0 + ], + "31": [ + 0 + ], + "32": [ + 0 + ], + "33": [ + 0 + ], + "34": [ + 0 + ], + "35": [ + 0, + 0 + ], + "36": [ + 0, + 0 + ], + "37": [ + 0, + 0 + ], + "38": [ + 0, + 0, + 0, + 0 + ], + "39": [ + 0, + 0 + ], + "40": [ + 0, + 0 + ], + "41": [ + 0, + 0 + ], + "42": [ + 0, + 0 + ], + "43": [ + 0, + 0 + ], + "44": [ + 0, + 0 + ], + "45": [ + 0, + 0 + ], + "46": [ + 0, + 0 + ], + "47": [ + 0, + 0 + ], + "48": [ + 0, + 0 + ], + "49": [ + 0, + 0, + 0, + 0 + ], + "50": [ + 0, + 0 + ], + "51": [ + 0, + 0, + 0 + ], + "52": [ + 0, + 0 + ], + "53": [ + 0, + 0 + ], + "54": [ + 0, + 0 + ], + "55": [ + 0, + 0 + ], + "56": [ + 0, + 0 + ], + "57": [ + 0, + 0 + ], + "58": [ + 0, + 0 + ], + "59": [ + 0, + 0 + ], + "60": [ + 0, + 0 + ], + "61": [ + 0, + 0 + ], + "62": [ + 0, + 0 + ], + "63": [ + 0, + 0 + ] + }, + "f": { + "0": 0, + "1": 0, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0, + "10": 0, + "11": 0, + "12": 0, + "13": 0, + "14": 0, + "15": 0, + "16": 0, + "17": 0, + "18": 0, + "19": 0, + "20": 0, + "21": 0, + "22": 0, + "23": 0, + "24": 0, + "25": 0, + "26": 0, + "27": 0, + "28": 0, + "29": 0, + "30": 0, + "31": 0, + "32": 0, + "33": 0, + "34": 0, + "35": 0, + "36": 0, + "37": 0, + "38": 0, + "39": 0, + "40": 0, + "41": 0, + "42": 0 + }, + "s": { + "0": 0, + "1": 0, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0, + "10": 0, + "11": 0, + "12": 0, + "13": 0, + "14": 0, + "15": 0, + "16": 0, + "17": 0, + "18": 0, + "19": 0, + "20": 0, + "21": 0, + "22": 0, + "23": 0, + "24": 0, + "25": 0, + "26": 0, + "27": 0, + "28": 0, + "29": 0, + "30": 0, + "31": 0, + "32": 0, + "33": 0, + "34": 0, + "35": 0, + "36": 0, + "37": 0, + "38": 0, + "39": 0, + "40": 0, + "41": 0, + "42": 0, + "43": 0, + "44": 0, + "45": 0, + "46": 0, + "47": 0, + "48": 0, + "49": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "57": 0, + "58": 0, + "59": 0, + "60": 0, + "61": 0, + "62": 0, + "63": 0, + "64": 0, + "65": 0, + "66": 0, + "67": 0, + "68": 0, + "69": 0, + "70": 0, + "71": 0, + "72": 0, + "73": 0, + "74": 0, + "75": 0, + "76": 0, + "77": 0, + "78": 0, + "79": 0, + "80": 0, + "81": 0, + "82": 0, + "83": 0, + "84": 0, + "85": 0, + "86": 0, + "87": 0, + "88": 0, + "89": 0, + "90": 0, + "91": 0, + "92": 0, + "93": 0, + "94": 0, + "95": 0, + "96": 0, + "97": 0, + "98": 0, + "99": 0, + "100": 0, + "101": 0, + "102": 0, + "103": 0, + "104": 0, + "105": 0, + "106": 0, + "107": 0, + "108": 0, + "109": 0, + "110": 0, + "111": 0, + "112": 0, + "113": 0, + "114": 0, + "115": 0, + "116": 0, + "117": 0, + "118": 0, + "119": 0, + "120": 0, + "121": 0, + "122": 0, + "123": 0, + "124": 0, + "125": 0, + "126": 0, + "127": 0, + "128": 0, + "129": 0, + "130": 0, + "131": 0, + "132": 0, + "133": 0, + "134": 0, + "135": 0, + "136": 0, + "137": 0, + "138": 0, + "139": 0, + "140": 0, + "141": 0, + "142": 0, + "143": 0, + "144": 0, + "145": 0, + "146": 0, + "147": 0, + "148": 0, + "149": 0, + "150": 0, + "151": 0, + "152": 0, + "153": 0, + "154": 0 + }, + "branchMap": { + "0": { + "loc": { + "start": { + "line": 78, + "column": 2 + }, + "end": { + "line": 78, + "column": 101 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 78, + "column": 3 + }, + "end": { + "line": 78, + "column": 9 + } + }, + { + "start": { + "line": 78, + "column": 13 + }, + "end": { + "line": 78, + "column": 31 + } + }, + { + "start": { + "line": 78, + "column": 35 + }, + "end": { + "line": 78, + "column": 76 + } + }, + { + "start": { + "line": 78, + "column": 81 + }, + "end": { + "line": 78, + "column": 101 + } + } + ], + "line": 78 + }, + "1": { + "loc": { + "start": { + "line": 189, + "column": 4 + }, + "end": { + "line": 191, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 189, + "column": 4 + }, + "end": { + "line": 191, + "column": 5 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 189 + }, + "2": { + "loc": { + "start": { + "line": 192, + "column": 22 + }, + "end": { + "line": 192, + "column": 80 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 192, + "column": 42 + }, + "end": { + "line": 192, + "column": 60 + } + }, + { + "start": { + "line": 192, + "column": 63 + }, + "end": { + "line": 192, + "column": 80 + } + } + ], + "line": 192 + }, + "3": { + "loc": { + "start": { + "line": 224, + "column": 6 + }, + "end": { + "line": 224, + "column": 31 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 224, + "column": 27 + }, + "end": { + "line": 224, + "column": 31 + } + } + ], + "line": 224 + }, + "4": { + "loc": { + "start": { + "line": 225, + "column": 6 + }, + "end": { + "line": 225, + "column": 19 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 225, + "column": 17 + }, + "end": { + "line": 225, + "column": 19 + } + } + ], + "line": 225 + }, + "5": { + "loc": { + "start": { + "line": 226, + "column": 6 + }, + "end": { + "line": 226, + "column": 23 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 226, + "column": 22 + }, + "end": { + "line": 226, + "column": 23 + } + } + ], + "line": 226 + }, + "6": { + "loc": { + "start": { + "line": 229, + "column": 6 + }, + "end": { + "line": 229, + "column": 25 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 229, + "column": 23 + }, + "end": { + "line": 229, + "column": 25 + } + } + ], + "line": 229 + }, + "7": { + "loc": { + "start": { + "line": 230, + "column": 6 + }, + "end": { + "line": 230, + "column": 22 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 230, + "column": 17 + }, + "end": { + "line": 230, + "column": 22 + } + } + ], + "line": 230 + }, + "8": { + "loc": { + "start": { + "line": 232, + "column": 6 + }, + "end": { + "line": 232, + "column": 31 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 232, + "column": 29 + }, + "end": { + "line": 232, + "column": 31 + } + } + ], + "line": 232 + }, + "9": { + "loc": { + "start": { + "line": 233, + "column": 6 + }, + "end": { + "line": 233, + "column": 24 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 233, + "column": 19 + }, + "end": { + "line": 233, + "column": 24 + } + } + ], + "line": 233 + }, + "10": { + "loc": { + "start": { + "line": 234, + "column": 8 + }, + "end": { + "line": 234, + "column": 35 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 234, + "column": 8 + }, + "end": { + "line": 234, + "column": 29 + } + }, + { + "start": { + "line": 234, + "column": 33 + }, + "end": { + "line": 234, + "column": 35 + } + } + ], + "line": 234 + }, + "11": { + "loc": { + "start": { + "line": 261, + "column": 4 + }, + "end": { + "line": 280, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 261, + "column": 4 + }, + "end": { + "line": 280, + "column": 5 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 261 + }, + "12": { + "loc": { + "start": { + "line": 263, + "column": 6 + }, + "end": { + "line": 265, + "column": 7 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 263, + "column": 6 + }, + "end": { + "line": 265, + "column": 7 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 263 + }, + "13": { + "loc": { + "start": { + "line": 267, + "column": 6 + }, + "end": { + "line": 273, + "column": 7 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 267, + "column": 6 + }, + "end": { + "line": 273, + "column": 7 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 267 + }, + "14": { + "loc": { + "start": { + "line": 276, + "column": 6 + }, + "end": { + "line": 279, + "column": 7 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 276, + "column": 6 + }, + "end": { + "line": 279, + "column": 7 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 276 + }, + "15": { + "loc": { + "start": { + "line": 312, + "column": 4 + }, + "end": { + "line": 319, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 312, + "column": 4 + }, + "end": { + "line": 319, + "column": 5 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 312 + }, + "16": { + "loc": { + "start": { + "line": 339, + "column": 6 + }, + "end": { + "line": 387, + "column": 7 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 339, + "column": 6 + }, + "end": { + "line": 387, + "column": 7 + } + }, + { + "start": { + "line": 381, + "column": 13 + }, + "end": { + "line": 387, + "column": 7 + } + } + ], + "line": 339 + }, + "17": { + "loc": { + "start": { + "line": 339, + "column": 10 + }, + "end": { + "line": 339, + "column": 50 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 339, + "column": 10 + }, + "end": { + "line": 339, + "column": 18 + } + }, + { + "start": { + "line": 339, + "column": 22 + }, + "end": { + "line": 339, + "column": 50 + } + } + ], + "line": 339 + }, + "18": { + "loc": { + "start": { + "line": 341, + "column": 8 + }, + "end": { + "line": 341, + "column": 90 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 341, + "column": 8 + }, + "end": { + "line": 341, + "column": 90 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 341 + }, + "19": { + "loc": { + "start": { + "line": 343, + "column": 37 + }, + "end": { + "line": 343, + "column": 57 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 343, + "column": 37 + }, + "end": { + "line": 343, + "column": 49 + } + }, + { + "start": { + "line": 343, + "column": 53 + }, + "end": { + "line": 343, + "column": 57 + } + } + ], + "line": 343 + }, + "20": { + "loc": { + "start": { + "line": 348, + "column": 8 + }, + "end": { + "line": 350, + "column": 9 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 348, + "column": 8 + }, + "end": { + "line": 350, + "column": 9 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 348 + }, + "21": { + "loc": { + "start": { + "line": 348, + "column": 12 + }, + "end": { + "line": 348, + "column": 62 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 348, + "column": 12 + }, + "end": { + "line": 348, + "column": 40 + } + }, + { + "start": { + "line": 348, + "column": 44 + }, + "end": { + "line": 348, + "column": 62 + } + } + ], + "line": 348 + }, + "22": { + "loc": { + "start": { + "line": 354, + "column": 8 + }, + "end": { + "line": 356, + "column": 9 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 354, + "column": 8 + }, + "end": { + "line": 356, + "column": 9 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 354 + }, + "23": { + "loc": { + "start": { + "line": 354, + "column": 12 + }, + "end": { + "line": 354, + "column": 52 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 354, + "column": 12 + }, + "end": { + "line": 354, + "column": 20 + } + }, + { + "start": { + "line": 354, + "column": 24 + }, + "end": { + "line": 354, + "column": 52 + } + } + ], + "line": 354 + }, + "24": { + "loc": { + "start": { + "line": 372, + "column": 8 + }, + "end": { + "line": 379, + "column": 9 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 372, + "column": 8 + }, + "end": { + "line": 379, + "column": 9 + } + }, + { + "start": { + "line": 377, + "column": 15 + }, + "end": { + "line": 379, + "column": 9 + } + } + ], + "line": 372 + }, + "25": { + "loc": { + "start": { + "line": 372, + "column": 12 + }, + "end": { + "line": 372, + "column": 40 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 372, + "column": 12 + }, + "end": { + "line": 372, + "column": 30 + } + }, + { + "start": { + "line": 372, + "column": 34 + }, + "end": { + "line": 372, + "column": 40 + } + } + ], + "line": 372 + }, + "26": { + "loc": { + "start": { + "line": 383, + "column": 10 + }, + "end": { + "line": 383, + "column": 95 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 383, + "column": 10 + }, + "end": { + "line": 383, + "column": 22 + } + }, + { + "start": { + "line": 383, + "column": 26 + }, + "end": { + "line": 383, + "column": 95 + } + } + ], + "line": 383 + }, + "27": { + "loc": { + "start": { + "line": 418, + "column": 19 + }, + "end": { + "line": 418, + "column": 86 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 418, + "column": 19 + }, + "end": { + "line": 418, + "column": 27 + } + }, + { + "start": { + "line": 418, + "column": 31 + }, + "end": { + "line": 418, + "column": 86 + } + } + ], + "line": 418 + }, + "28": { + "loc": { + "start": { + "line": 429, + "column": 4 + }, + "end": { + "line": 432, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 429, + "column": 4 + }, + "end": { + "line": 432, + "column": 5 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 429 + }, + "29": { + "loc": { + "start": { + "line": 429, + "column": 8 + }, + "end": { + "line": 429, + "column": 79 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 429, + "column": 8 + }, + "end": { + "line": 429, + "column": 28 + } + }, + { + "start": { + "line": 429, + "column": 32 + }, + "end": { + "line": 429, + "column": 53 + } + }, + { + "start": { + "line": 429, + "column": 57 + }, + "end": { + "line": 429, + "column": 79 + } + } + ], + "line": 429 + }, + "30": { + "loc": { + "start": { + "line": 436, + "column": 4 + }, + "end": { + "line": 442, + "column": 5 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 436, + "column": 4 + }, + "end": { + "line": 442, + "column": 5 + } + }, + { + "start": {}, + "end": {} + } + ], + "line": 436 + }, + "31": { + "loc": { + "start": { + "line": 468, + "column": 6 + }, + "end": { + "line": 468, + "column": 23 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 468, + "column": 22 + }, + "end": { + "line": 468, + "column": 23 + } + } + ], + "line": 468 + }, + "32": { + "loc": { + "start": { + "line": 488, + "column": 11 + }, + "end": { + "line": 488, + "column": 30 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 488, + "column": 25 + }, + "end": { + "line": 488, + "column": 30 + } + } + ], + "line": 488 + }, + "33": { + "loc": { + "start": { + "line": 488, + "column": 32 + }, + "end": { + "line": 488, + "column": 46 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 488, + "column": 44 + }, + "end": { + "line": 488, + "column": 46 + } + } + ], + "line": 488 + }, + "34": { + "loc": { + "start": { + "line": 488, + "column": 48 + }, + "end": { + "line": 488, + "column": 64 + } + }, + "type": "default-arg", + "locations": [ + { + "start": { + "line": 488, + "column": 59 + }, + "end": { + "line": 488, + "column": 64 + } + } + ], + "line": 488 + }, + "35": { + "loc": { + "start": { + "line": 488, + "column": 68 + }, + "end": { + "line": 488, + "column": 82 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 488, + "column": 68 + }, + "end": { + "line": 488, + "column": 76 + } + }, + { + "start": { + "line": 488, + "column": 80 + }, + "end": { + "line": 488, + "column": 82 + } + } + ], + "line": 488 + }, + "36": { + "loc": { + "start": { + "line": 489, + "column": 34 + }, + "end": { + "line": 489, + "column": 63 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 489, + "column": 34 + }, + "end": { + "line": 489, + "column": 48 + } + }, + { + "start": { + "line": 489, + "column": 52 + }, + "end": { + "line": 489, + "column": 63 + } + } + ], + "line": 489 + }, + "37": { + "loc": { + "start": { + "line": 506, + "column": 13 + }, + "end": { + "line": 517, + "column": 13 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 507, + "column": 30 + }, + "end": { + "line": 507, + "column": 34 + } + }, + { + "start": { + "line": 507, + "column": 37 + }, + "end": { + "line": 517, + "column": 13 + } + } + ], + "line": 506 + }, + "38": { + "loc": { + "start": { + "line": 506, + "column": 13 + }, + "end": { + "line": 507, + "column": 27 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 506, + "column": 14 + }, + "end": { + "line": 506, + "column": 35 + } + }, + { + "start": { + "line": 506, + "column": 39 + }, + "end": { + "line": 506, + "column": 61 + } + }, + { + "start": { + "line": 506, + "column": 65 + }, + "end": { + "line": 506, + "column": 88 + } + }, + { + "start": { + "line": 507, + "column": 12 + }, + "end": { + "line": 507, + "column": 27 + } + } + ], + "line": 506 + }, + "39": { + "loc": { + "start": { + "line": 507, + "column": 37 + }, + "end": { + "line": 517, + "column": 13 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 508, + "column": 14 + }, + "end": { + "line": 514, + "column": 16 + } + }, + { + "start": { + "line": 516, + "column": 14 + }, + "end": { + "line": 516, + "column": 35 + } + } + ], + "line": 507 + }, + "40": { + "loc": { + "start": { + "line": 519, + "column": 13 + }, + "end": { + "line": 521, + "column": 20 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 520, + "column": 14 + }, + "end": { + "line": 520, + "column": 111 + } + }, + { + "start": { + "line": 521, + "column": 16 + }, + "end": { + "line": 521, + "column": 20 + } + } + ], + "line": 519 + }, + "41": { + "loc": { + "start": { + "line": 519, + "column": 13 + }, + "end": { + "line": 519, + "column": 48 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 519, + "column": 13 + }, + "end": { + "line": 519, + "column": 30 + } + }, + { + "start": { + "line": 519, + "column": 34 + }, + "end": { + "line": 519, + "column": 48 + } + } + ], + "line": 519 + }, + "42": { + "loc": { + "start": { + "line": 522, + "column": 13 + }, + "end": { + "line": 531, + "column": 13 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 522, + "column": 13 + }, + "end": { + "line": 522, + "column": 21 + } + }, + { + "start": { + "line": 523, + "column": 14 + }, + "end": { + "line": 530, + "column": 20 + } + } + ], + "line": 522 + }, + "43": { + "loc": { + "start": { + "line": 533, + "column": 13 + }, + "end": { + "line": 533, + "column": 75 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 533, + "column": 34 + }, + "end": { + "line": 533, + "column": 68 + } + }, + { + "start": { + "line": 533, + "column": 71 + }, + "end": { + "line": 533, + "column": 75 + } + } + ], + "line": 533 + }, + "44": { + "loc": { + "start": { + "line": 535, + "column": 13 + }, + "end": { + "line": 547, + "column": 20 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 536, + "column": 16 + }, + "end": { + "line": 546, + "column": 18 + } + }, + { + "start": { + "line": 547, + "column": 16 + }, + "end": { + "line": 547, + "column": 20 + } + } + ], + "line": 535 + }, + "45": { + "loc": { + "start": { + "line": 535, + "column": 13 + }, + "end": { + "line": 535, + "column": 44 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 535, + "column": 13 + }, + "end": { + "line": 535, + "column": 21 + } + }, + { + "start": { + "line": 535, + "column": 25 + }, + "end": { + "line": 535, + "column": 44 + } + } + ], + "line": 535 + }, + "46": { + "loc": { + "start": { + "line": 549, + "column": 13 + }, + "end": { + "line": 558, + "column": 16 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 549, + "column": 13 + }, + "end": { + "line": 549, + "column": 25 + } + }, + { + "start": { + "line": 550, + "column": 14 + }, + "end": { + "line": 558, + "column": 16 + } + } + ], + "line": 549 + }, + "47": { + "loc": { + "start": { + "line": 560, + "column": 13 + }, + "end": { + "line": 567, + "column": 20 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 561, + "column": 14 + }, + "end": { + "line": 566, + "column": 16 + } + }, + { + "start": { + "line": 567, + "column": 16 + }, + "end": { + "line": 567, + "column": 20 + } + } + ], + "line": 560 + }, + "48": { + "loc": { + "start": { + "line": 569, + "column": 13 + }, + "end": { + "line": 575, + "column": 20 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 570, + "column": 14 + }, + "end": { + "line": 574, + "column": 23 + } + }, + { + "start": { + "line": 575, + "column": 16 + }, + "end": { + "line": 575, + "column": 20 + } + } + ], + "line": 569 + }, + "49": { + "loc": { + "start": { + "line": 569, + "column": 13 + }, + "end": { + "line": 569, + "column": 111 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 569, + "column": 14 + }, + "end": { + "line": 569, + "column": 24 + } + }, + { + "start": { + "line": 569, + "column": 28 + }, + "end": { + "line": 569, + "column": 63 + } + }, + { + "start": { + "line": 569, + "column": 69 + }, + "end": { + "line": 569, + "column": 75 + } + }, + { + "start": { + "line": 569, + "column": 79 + }, + "end": { + "line": 569, + "column": 110 + } + } + ], + "line": 569 + }, + "50": { + "loc": { + "start": { + "line": 586, + "column": 13 + }, + "end": { + "line": 624, + "column": 20 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 587, + "column": 14 + }, + "end": { + "line": 623, + "column": 16 + } + }, + { + "start": { + "line": 624, + "column": 16 + }, + "end": { + "line": 624, + "column": 20 + } + } + ], + "line": 586 + }, + "51": { + "loc": { + "start": { + "line": 588, + "column": 27 + }, + "end": { + "line": 588, + "column": 82 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 588, + "column": 27 + }, + "end": { + "line": 588, + "column": 48 + } + }, + { + "start": { + "line": 588, + "column": 52 + }, + "end": { + "line": 588, + "column": 74 + } + }, + { + "start": { + "line": 588, + "column": 78 + }, + "end": { + "line": 588, + "column": 82 + } + } + ], + "line": 588 + }, + "52": { + "loc": { + "start": { + "line": 599, + "column": 20 + }, + "end": { + "line": 599, + "column": 93 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 599, + "column": 20 + }, + "end": { + "line": 599, + "column": 64 + } + }, + { + "start": { + "line": 599, + "column": 68 + }, + "end": { + "line": 599, + "column": 93 + } + } + ], + "line": 599 + }, + "53": { + "loc": { + "start": { + "line": 616, + "column": 23 + }, + "end": { + "line": 616, + "column": 43 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 616, + "column": 23 + }, + "end": { + "line": 616, + "column": 37 + } + }, + { + "start": { + "line": 616, + "column": 41 + }, + "end": { + "line": 616, + "column": 43 + } + } + ], + "line": 616 + }, + "54": { + "loc": { + "start": { + "line": 617, + "column": 30 + }, + "end": { + "line": 617, + "column": 57 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 617, + "column": 30 + }, + "end": { + "line": 617, + "column": 51 + } + }, + { + "start": { + "line": 617, + "column": 55 + }, + "end": { + "line": 617, + "column": 57 + } + } + ], + "line": 617 + }, + "55": { + "loc": { + "start": { + "line": 618, + "column": 29 + }, + "end": { + "line": 618, + "column": 55 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 618, + "column": 29 + }, + "end": { + "line": 618, + "column": 49 + } + }, + { + "start": { + "line": 618, + "column": 53 + }, + "end": { + "line": 618, + "column": 55 + } + } + ], + "line": 618 + }, + "56": { + "loc": { + "start": { + "line": 619, + "column": 26 + }, + "end": { + "line": 619, + "column": 49 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 619, + "column": 26 + }, + "end": { + "line": 619, + "column": 43 + } + }, + { + "start": { + "line": 619, + "column": 47 + }, + "end": { + "line": 619, + "column": 49 + } + } + ], + "line": 619 + }, + "57": { + "loc": { + "start": { + "line": 620, + "column": 30 + }, + "end": { + "line": 620, + "column": 57 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 620, + "column": 30 + }, + "end": { + "line": 620, + "column": 51 + } + }, + { + "start": { + "line": 620, + "column": 55 + }, + "end": { + "line": 620, + "column": 57 + } + } + ], + "line": 620 + }, + "58": { + "loc": { + "start": { + "line": 625, + "column": 13 + }, + "end": { + "line": 625, + "column": 70 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 625, + "column": 32 + }, + "end": { + "line": 625, + "column": 63 + } + }, + { + "start": { + "line": 625, + "column": 66 + }, + "end": { + "line": 625, + "column": 70 + } + } + ], + "line": 625 + }, + "59": { + "loc": { + "start": { + "line": 627, + "column": 13 + }, + "end": { + "line": 627, + "column": 91 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 627, + "column": 30 + }, + "end": { + "line": 627, + "column": 84 + } + }, + { + "start": { + "line": 627, + "column": 87 + }, + "end": { + "line": 627, + "column": 91 + } + } + ], + "line": 627 + }, + "60": { + "loc": { + "start": { + "line": 642, + "column": 26 + }, + "end": { + "line": 642, + "column": 72 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 642, + "column": 26 + }, + "end": { + "line": 642, + "column": 53 + } + }, + { + "start": { + "line": 642, + "column": 57 + }, + "end": { + "line": 642, + "column": 72 + } + } + ], + "line": 642 + }, + "61": { + "loc": { + "start": { + "line": 709, + "column": 20 + }, + "end": { + "line": 709, + "column": 112 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 709, + "column": 20 + }, + "end": { + "line": 709, + "column": 61 + } + }, + { + "start": { + "line": 709, + "column": 65 + }, + "end": { + "line": 709, + "column": 112 + } + } + ], + "line": 709 + }, + "62": { + "loc": { + "start": { + "line": 722, + "column": 20 + }, + "end": { + "line": 722, + "column": 113 + } + }, + "type": "binary-expr", + "locations": [ + { + "start": { + "line": 722, + "column": 20 + }, + "end": { + "line": 722, + "column": 61 + } + }, + { + "start": { + "line": 722, + "column": 65 + }, + "end": { + "line": 722, + "column": 113 + } + } + ], + "line": 722 + }, + "63": { + "loc": { + "start": { + "line": 732, + "column": 11 + }, + "end": { + "line": 732, + "column": 46 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 732, + "column": 25 + }, + "end": { + "line": 732, + "column": 39 + } + }, + { + "start": { + "line": 732, + "column": 42 + }, + "end": { + "line": 732, + "column": 46 + } + } + ], + "line": 732 + } + }, + "fnMap": { + "0": { + "name": "(anonymous_0)", + "decl": { + "start": { + "line": 84, + "column": 26 + }, + "end": { + "line": 84, + "column": 27 + } + }, + "loc": { + "start": { + "line": 84, + "column": 32 + }, + "end": { + "line": 101, + "column": 1 + } + }, + "line": 84 + }, + "1": { + "name": "(anonymous_1)", + "decl": { + "start": { + "line": 111, + "column": 13 + }, + "end": { + "line": 111, + "column": 14 + } + }, + "loc": { + "start": { + "line": 111, + "column": 19 + }, + "end": { + "line": 111, + "column": 113 + } + }, + "line": 111 + }, + "2": { + "name": "(anonymous_2)", + "decl": { + "start": { + "line": 122, + "column": 27 + }, + "end": { + "line": 122, + "column": 28 + } + }, + "loc": { + "start": { + "line": 122, + "column": 33 + }, + "end": { + "line": 124, + "column": 3 + } + }, + "line": 122 + }, + "3": { + "name": "(anonymous_3)", + "decl": { + "start": { + "line": 125, + "column": 26 + }, + "end": { + "line": 125, + "column": 27 + } + }, + "loc": { + "start": { + "line": 125, + "column": 32 + }, + "end": { + "line": 127, + "column": 3 + } + }, + "line": 125 + }, + "4": { + "name": "(anonymous_4)", + "decl": { + "start": { + "line": 131, + "column": 30 + }, + "end": { + "line": 131, + "column": 31 + } + }, + "loc": { + "start": { + "line": 131, + "column": 36 + }, + "end": { + "line": 131, + "column": 38 + } + }, + "line": 131 + }, + "5": { + "name": "(anonymous_5)", + "decl": { + "start": { + "line": 132, + "column": 26 + }, + "end": { + "line": 132, + "column": 27 + } + }, + "loc": { + "start": { + "line": 132, + "column": 32 + }, + "end": { + "line": 132, + "column": 34 + } + }, + "line": 132 + }, + "6": { + "name": "(anonymous_6)", + "decl": { + "start": { + "line": 137, + "column": 2 + }, + "end": { + "line": 137, + "column": 3 + } + }, + "loc": { + "start": { + "line": 137, + "column": 26 + }, + "end": { + "line": 209, + "column": 3 + } + }, + "line": 137 + }, + "7": { + "name": "(anonymous_7)", + "decl": { + "start": { + "line": 196, + "column": 54 + }, + "end": { + "line": 196, + "column": 55 + } + }, + "loc": { + "start": { + "line": 196, + "column": 66 + }, + "end": { + "line": 201, + "column": 5 + } + }, + "line": 196 + }, + "8": { + "name": "(anonymous_8)", + "decl": { + "start": { + "line": 202, + "column": 72 + }, + "end": { + "line": 202, + "column": 73 + } + }, + "loc": { + "start": { + "line": 202, + "column": 101 + }, + "end": { + "line": 207, + "column": 5 + } + }, + "line": 202 + }, + "9": { + "name": "(anonymous_9)", + "decl": { + "start": { + "line": 211, + "column": 2 + }, + "end": { + "line": 211, + "column": 3 + } + }, + "loc": { + "start": { + "line": 211, + "column": 32 + }, + "end": { + "line": 220, + "column": 3 + } + }, + "line": 211 + }, + "10": { + "name": "(anonymous_10)", + "decl": { + "start": { + "line": 222, + "column": 35 + }, + "end": { + "line": 222, + "column": 36 + } + }, + "loc": { + "start": { + "line": 222, + "column": 65 + }, + "end": { + "line": 249, + "column": 3 + } + }, + "line": 222 + }, + "11": { + "name": "(anonymous_11)", + "decl": { + "start": { + "line": 254, + "column": 32 + }, + "end": { + "line": 254, + "column": 33 + } + }, + "loc": { + "start": { + "line": 254, + "column": 70 + }, + "end": { + "line": 257, + "column": 3 + } + }, + "line": 254 + }, + "12": { + "name": "(anonymous_12)", + "decl": { + "start": { + "line": 259, + "column": 2 + }, + "end": { + "line": 259, + "column": 3 + } + }, + "loc": { + "start": { + "line": 259, + "column": 32 + }, + "end": { + "line": 281, + "column": 3 + } + }, + "line": 259 + }, + "13": { + "name": "(anonymous_13)", + "decl": { + "start": { + "line": 283, + "column": 25 + }, + "end": { + "line": 283, + "column": 26 + } + }, + "loc": { + "start": { + "line": 283, + "column": 31 + }, + "end": { + "line": 296, + "column": 3 + } + }, + "line": 283 + }, + "14": { + "name": "(anonymous_14)", + "decl": { + "start": { + "line": 298, + "column": 2 + }, + "end": { + "line": 298, + "column": 3 + } + }, + "loc": { + "start": { + "line": 298, + "column": 32 + }, + "end": { + "line": 308, + "column": 3 + } + }, + "line": 298 + }, + "15": { + "name": "(anonymous_15)", + "decl": { + "start": { + "line": 301, + "column": 12 + }, + "end": { + "line": 301, + "column": 13 + } + }, + "loc": { + "start": { + "line": 301, + "column": 24 + }, + "end": { + "line": 304, + "column": 7 + } + }, + "line": 301 + }, + "16": { + "name": "(anonymous_16)", + "decl": { + "start": { + "line": 305, + "column": 13 + }, + "end": { + "line": 305, + "column": 14 + } + }, + "loc": { + "start": { + "line": 305, + "column": 19 + }, + "end": { + "line": 307, + "column": 7 + } + }, + "line": 305 + }, + "17": { + "name": "(anonymous_17)", + "decl": { + "start": { + "line": 310, + "column": 2 + }, + "end": { + "line": 310, + "column": 3 + } + }, + "loc": { + "start": { + "line": 310, + "column": 28 + }, + "end": { + "line": 321, + "column": 3 + } + }, + "line": 310 + }, + "18": { + "name": "(anonymous_18)", + "decl": { + "start": { + "line": 315, + "column": 18 + }, + "end": { + "line": 315, + "column": 19 + } + }, + "loc": { + "start": { + "line": 315, + "column": 24 + }, + "end": { + "line": 317, + "column": 9 + } + }, + "line": 315 + }, + "19": { + "name": "(anonymous_19)", + "decl": { + "start": { + "line": 323, + "column": 2 + }, + "end": { + "line": 323, + "column": 3 + } + }, + "loc": { + "start": { + "line": 323, + "column": 25 + }, + "end": { + "line": 327, + "column": 3 + } + }, + "line": 323 + }, + "20": { + "name": "(anonymous_20)", + "decl": { + "start": { + "line": 329, + "column": 2 + }, + "end": { + "line": 329, + "column": 3 + } + }, + "loc": { + "start": { + "line": 329, + "column": 22 + }, + "end": { + "line": 393, + "column": 3 + } + }, + "line": 329 + }, + "21": { + "name": "(anonymous_21)", + "decl": { + "start": { + "line": 395, + "column": 33 + }, + "end": { + "line": 395, + "column": 34 + } + }, + "loc": { + "start": { + "line": 395, + "column": 48 + }, + "end": { + "line": 401, + "column": 3 + } + }, + "line": 395 + }, + "22": { + "name": "(anonymous_22)", + "decl": { + "start": { + "line": 403, + "column": 22 + }, + "end": { + "line": 403, + "column": 23 + } + }, + "loc": { + "start": { + "line": 403, + "column": 37 + }, + "end": { + "line": 410, + "column": 3 + } + }, + "line": 403 + }, + "23": { + "name": "(anonymous_23)", + "decl": { + "start": { + "line": 412, + "column": 2 + }, + "end": { + "line": 412, + "column": 3 + } + }, + "loc": { + "start": { + "line": 412, + "column": 18 + }, + "end": { + "line": 415, + "column": 3 + } + }, + "line": 412 + }, + "24": { + "name": "(anonymous_24)", + "decl": { + "start": { + "line": 417, + "column": 26 + }, + "end": { + "line": 417, + "column": 27 + } + }, + "loc": { + "start": { + "line": 417, + "column": 83 + }, + "end": { + "line": 426, + "column": 3 + } + }, + "line": 417 + }, + "25": { + "name": "(anonymous_25)", + "decl": { + "start": { + "line": 428, + "column": 2 + }, + "end": { + "line": 428, + "column": 3 + } + }, + "loc": { + "start": { + "line": 428, + "column": 24 + }, + "end": { + "line": 433, + "column": 3 + } + }, + "line": 428 + }, + "26": { + "name": "(anonymous_26)", + "decl": { + "start": { + "line": 435, + "column": 2 + }, + "end": { + "line": 435, + "column": 3 + } + }, + "loc": { + "start": { + "line": 435, + "column": 26 + }, + "end": { + "line": 443, + "column": 3 + } + }, + "line": 435 + }, + "27": { + "name": "(anonymous_27)", + "decl": { + "start": { + "line": 445, + "column": 2 + }, + "end": { + "line": 445, + "column": 3 + } + }, + "loc": { + "start": { + "line": 445, + "column": 29 + }, + "end": { + "line": 462, + "column": 3 + } + }, + "line": 445 + }, + "28": { + "name": "(anonymous_28)", + "decl": { + "start": { + "line": 464, + "column": 2 + }, + "end": { + "line": 464, + "column": 3 + } + }, + "loc": { + "start": { + "line": 464, + "column": 11 + }, + "end": { + "line": 737, + "column": 3 + } + }, + "line": 464 + }, + "29": { + "name": "(anonymous_29)", + "decl": { + "start": { + "line": 536, + "column": 29 + }, + "end": { + "line": 536, + "column": 30 + } + }, + "loc": { + "start": { + "line": 536, + "column": 65 + }, + "end": { + "line": 546, + "column": 17 + } + }, + "line": 536 + }, + "30": { + "name": "(anonymous_30)", + "decl": { + "start": { + "line": 550, + "column": 31 + }, + "end": { + "line": 550, + "column": 32 + } + }, + "loc": { + "start": { + "line": 550, + "column": 48 + }, + "end": { + "line": 558, + "column": 15 + } + }, + "line": 550 + }, + "31": { + "name": "(anonymous_31)", + "decl": { + "start": { + "line": 562, + "column": 25 + }, + "end": { + "line": 562, + "column": 26 + } + }, + "loc": { + "start": { + "line": 562, + "column": 31 + }, + "end": { + "line": 564, + "column": 17 + } + }, + "line": 562 + }, + "32": { + "name": "(anonymous_32)", + "decl": { + "start": { + "line": 594, + "column": 39 + }, + "end": { + "line": 594, + "column": 40 + } + }, + "loc": { + "start": { + "line": 594, + "column": 45 + }, + "end": { + "line": 601, + "column": 17 + } + }, + "line": 594 + }, + "33": { + "name": "(anonymous_33)", + "decl": { + "start": { + "line": 602, + "column": 32 + }, + "end": { + "line": 602, + "column": 33 + } + }, + "loc": { + "start": { + "line": 602, + "column": 49 + }, + "end": { + "line": 604, + "column": 17 + } + }, + "line": 602 + }, + "34": { + "name": "(anonymous_34)", + "decl": { + "start": { + "line": 606, + "column": 42 + }, + "end": { + "line": 606, + "column": 43 + } + }, + "loc": { + "start": { + "line": 606, + "column": 52 + }, + "end": { + "line": 610, + "column": 17 + } + }, + "line": 606 + }, + "35": { + "name": "(anonymous_35)", + "decl": { + "start": { + "line": 658, + "column": 22 + }, + "end": { + "line": 658, + "column": 23 + } + }, + "loc": { + "start": { + "line": 658, + "column": 28 + }, + "end": { + "line": 663, + "column": 15 + } + }, + "line": 658 + }, + "36": { + "name": "(anonymous_36)", + "decl": { + "start": { + "line": 666, + "column": 60 + }, + "end": { + "line": 666, + "column": 61 + } + }, + "loc": { + "start": { + "line": 666, + "column": 70 + }, + "end": { + "line": 675, + "column": 17 + } + }, + "line": 666 + }, + "37": { + "name": "(anonymous_37)", + "decl": { + "start": { + "line": 680, + "column": 34 + }, + "end": { + "line": 680, + "column": 35 + } + }, + "loc": { + "start": { + "line": 680, + "column": 46 + }, + "end": { + "line": 682, + "column": 15 + } + }, + "line": 680 + }, + "38": { + "name": "(anonymous_38)", + "decl": { + "start": { + "line": 683, + "column": 33 + }, + "end": { + "line": 683, + "column": 34 + } + }, + "loc": { + "start": { + "line": 683, + "column": 45 + }, + "end": { + "line": 683, + "column": 47 + } + }, + "line": 683 + }, + "39": { + "name": "(anonymous_39)", + "decl": { + "start": { + "line": 705, + "column": 27 + }, + "end": { + "line": 705, + "column": 28 + } + }, + "loc": { + "start": { + "line": 705, + "column": 33 + }, + "end": { + "line": 710, + "column": 19 + } + }, + "line": 705 + }, + "40": { + "name": "(anonymous_40)", + "decl": { + "start": { + "line": 718, + "column": 27 + }, + "end": { + "line": 718, + "column": 28 + } + }, + "loc": { + "start": { + "line": 718, + "column": 33 + }, + "end": { + "line": 723, + "column": 19 + } + }, + "line": 718 + }, + "41": { + "name": "(anonymous_41)", + "decl": { + "start": { + "line": 740, + "column": 24 + }, + "end": { + "line": 740, + "column": 25 + } + }, + "loc": { + "start": { + "line": 740, + "column": 35 + }, + "end": { + "line": 748, + "column": 1 + } + }, + "line": 740 + }, + "42": { + "name": "(anonymous_42)", + "decl": { + "start": { + "line": 750, + "column": 27 + }, + "end": { + "line": 750, + "column": 28 + } + }, + "loc": { + "start": { + "line": 750, + "column": 42 + }, + "end": { + "line": 752, + "column": 1 + } + }, + "line": 750 + } + }, + "statementMap": { + "0": { + "start": { + "line": 77, + "column": 0 + }, + "end": { + "line": 78, + "column": 102 + } + }, + "1": { + "start": { + "line": 79, + "column": 0 + }, + "end": { + "line": 79, + "column": 31 + } + }, + "2": { + "start": { + "line": 82, + "column": 22 + }, + "end": { + "line": 82, + "column": 26 + } + }, + "3": { + "start": { + "line": 84, + "column": 26 + }, + "end": { + "line": 101, + "column": 1 + } + }, + "4": { + "start": { + "line": 85, + "column": 2 + }, + "end": { + "line": 100, + "column": 4 + } + }, + "5": { + "start": { + "line": 110, + "column": 22 + }, + "end": { + "line": 112, + "column": 1 + } + }, + "6": { + "start": { + "line": 111, + "column": 19 + }, + "end": { + "line": 111, + "column": 113 + } + }, + "7": { + "start": { + "line": 122, + "column": 27 + }, + "end": { + "line": 124, + "column": 3 + } + }, + "8": { + "start": { + "line": 123, + "column": 4 + }, + "end": { + "line": 123, + "column": 36 + } + }, + "9": { + "start": { + "line": 125, + "column": 26 + }, + "end": { + "line": 127, + "column": 3 + } + }, + "10": { + "start": { + "line": 126, + "column": 4 + }, + "end": { + "line": 126, + "column": 38 + } + }, + "11": { + "start": { + "line": 128, + "column": 35 + }, + "end": { + "line": 133, + "column": 4 + } + }, + "12": { + "start": { + "line": 134, + "column": 32 + }, + "end": { + "line": 134, + "column": 37 + } + }, + "13": { + "start": { + "line": 135, + "column": 59 + }, + "end": { + "line": 135, + "column": 63 + } + }, + "14": { + "start": { + "line": 136, + "column": 53 + }, + "end": { + "line": 136, + "column": 57 + } + }, + "15": { + "start": { + "line": 138, + "column": 4 + }, + "end": { + "line": 138, + "column": 17 + } + }, + "16": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 182, + "column": 6 + } + }, + "17": { + "start": { + "line": 183, + "column": 4 + }, + "end": { + "line": 183, + "column": 24 + } + }, + "18": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 185, + "column": 19 + } + }, + "19": { + "start": { + "line": 186, + "column": 4 + }, + "end": { + "line": 186, + "column": 55 + } + }, + "20": { + "start": { + "line": 187, + "column": 4 + }, + "end": { + "line": 187, + "column": 49 + } + }, + "21": { + "start": { + "line": 188, + "column": 20 + }, + "end": { + "line": 188, + "column": 50 + } + }, + "22": { + "start": { + "line": 189, + "column": 4 + }, + "end": { + "line": 191, + "column": 5 + } + }, + "23": { + "start": { + "line": 190, + "column": 6 + }, + "end": { + "line": 190, + "column": 110 + } + }, + "24": { + "start": { + "line": 192, + "column": 22 + }, + "end": { + "line": 192, + "column": 80 + } + }, + "25": { + "start": { + "line": 193, + "column": 4 + }, + "end": { + "line": 193, + "column": 25 + } + }, + "26": { + "start": { + "line": 194, + "column": 4 + }, + "end": { + "line": 194, + "column": 38 + } + }, + "27": { + "start": { + "line": 195, + "column": 4 + }, + "end": { + "line": 195, + "column": 32 + } + }, + "28": { + "start": { + "line": 196, + "column": 4 + }, + "end": { + "line": 201, + "column": 7 + } + }, + "29": { + "start": { + "line": 197, + "column": 6 + }, + "end": { + "line": 200, + "column": 9 + } + }, + "30": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 207, + "column": 7 + } + }, + "31": { + "start": { + "line": 203, + "column": 6 + }, + "end": { + "line": 206, + "column": 9 + } + }, + "32": { + "start": { + "line": 208, + "column": 4 + }, + "end": { + "line": 208, + "column": 27 + } + }, + "33": { + "start": { + "line": 212, + "column": 31 + }, + "end": { + "line": 212, + "column": 56 + } + }, + "34": { + "start": { + "line": 213, + "column": 4 + }, + "end": { + "line": 213, + "column": 60 + } + }, + "35": { + "start": { + "line": 214, + "column": 4 + }, + "end": { + "line": 219, + "column": 7 + } + }, + "36": { + "start": { + "line": 222, + "column": 35 + }, + "end": { + "line": 249, + "column": 3 + } + }, + "37": { + "start": { + "line": 234, + "column": 8 + }, + "end": { + "line": 234, + "column": 35 + } + }, + "38": { + "start": { + "line": 235, + "column": 38 + }, + "end": { + "line": 235, + "column": 47 + } + }, + "39": { + "start": { + "line": 236, + "column": 4 + }, + "end": { + "line": 247, + "column": 7 + } + }, + "40": { + "start": { + "line": 248, + "column": 4 + }, + "end": { + "line": 248, + "column": 47 + } + }, + "41": { + "start": { + "line": 254, + "column": 32 + }, + "end": { + "line": 257, + "column": 3 + } + }, + "42": { + "start": { + "line": 255, + "column": 25 + }, + "end": { + "line": 255, + "column": 48 + } + }, + "43": { + "start": { + "line": 256, + "column": 4 + }, + "end": { + "line": 256, + "column": 45 + } + }, + "44": { + "start": { + "line": 261, + "column": 4 + }, + "end": { + "line": 280, + "column": 5 + } + }, + "45": { + "start": { + "line": 262, + "column": 27 + }, + "end": { + "line": 262, + "column": 53 + } + }, + "46": { + "start": { + "line": 263, + "column": 6 + }, + "end": { + "line": 265, + "column": 7 + } + }, + "47": { + "start": { + "line": 264, + "column": 8 + }, + "end": { + "line": 264, + "column": 15 + } + }, + "48": { + "start": { + "line": 267, + "column": 6 + }, + "end": { + "line": 273, + "column": 7 + } + }, + "49": { + "start": { + "line": 268, + "column": 8 + }, + "end": { + "line": 268, + "column": 90 + } + }, + "50": { + "start": { + "line": 269, + "column": 8 + }, + "end": { + "line": 271, + "column": 11 + } + }, + "51": { + "start": { + "line": 272, + "column": 8 + }, + "end": { + "line": 272, + "column": 38 + } + }, + "52": { + "start": { + "line": 274, + "column": 27 + }, + "end": { + "line": 274, + "column": 78 + } + }, + "53": { + "start": { + "line": 276, + "column": 6 + }, + "end": { + "line": 279, + "column": 7 + } + }, + "54": { + "start": { + "line": 277, + "column": 8 + }, + "end": { + "line": 277, + "column": 39 + } + }, + "55": { + "start": { + "line": 278, + "column": 8 + }, + "end": { + "line": 278, + "column": 47 + } + }, + "56": { + "start": { + "line": 283, + "column": 25 + }, + "end": { + "line": 296, + "column": 3 + } + }, + "57": { + "start": { + "line": 289, + "column": 4 + }, + "end": { + "line": 289, + "column": 17 + } + }, + "58": { + "start": { + "line": 290, + "column": 4 + }, + "end": { + "line": 295, + "column": 7 + } + }, + "59": { + "start": { + "line": 300, + "column": 4 + }, + "end": { + "line": 307, + "column": 9 + } + }, + "60": { + "start": { + "line": 303, + "column": 8 + }, + "end": { + "line": 303, + "column": 27 + } + }, + "61": { + "start": { + "line": 306, + "column": 8 + }, + "end": { + "line": 306, + "column": 27 + } + }, + "62": { + "start": { + "line": 311, + "column": 4 + }, + "end": { + "line": 311, + "column": 26 + } + }, + "63": { + "start": { + "line": 312, + "column": 4 + }, + "end": { + "line": 319, + "column": 5 + } + }, + "64": { + "start": { + "line": 313, + "column": 6 + }, + "end": { + "line": 313, + "column": 29 + } + }, + "65": { + "start": { + "line": 314, + "column": 6 + }, + "end": { + "line": 318, + "column": 9 + } + }, + "66": { + "start": { + "line": 316, + "column": 10 + }, + "end": { + "line": 316, + "column": 34 + } + }, + "67": { + "start": { + "line": 320, + "column": 4 + }, + "end": { + "line": 320, + "column": 43 + } + }, + "68": { + "start": { + "line": 324, + "column": 4 + }, + "end": { + "line": 324, + "column": 34 + } + }, + "69": { + "start": { + "line": 325, + "column": 4 + }, + "end": { + "line": 325, + "column": 26 + } + }, + "70": { + "start": { + "line": 326, + "column": 4 + }, + "end": { + "line": 326, + "column": 35 + } + }, + "71": { + "start": { + "line": 330, + "column": 17 + }, + "end": { + "line": 330, + "column": 21 + } + }, + "72": { + "start": { + "line": 331, + "column": 22 + }, + "end": { + "line": 331, + "column": 52 + } + }, + "73": { + "start": { + "line": 332, + "column": 4 + }, + "end": { + "line": 332, + "column": 47 + } + }, + "74": { + "start": { + "line": 333, + "column": 4 + }, + "end": { + "line": 336, + "column": 7 + } + }, + "75": { + "start": { + "line": 337, + "column": 4 + }, + "end": { + "line": 392, + "column": 5 + } + }, + "76": { + "start": { + "line": 338, + "column": 65 + }, + "end": { + "line": 338, + "column": 98 + } + }, + "77": { + "start": { + "line": 339, + "column": 6 + }, + "end": { + "line": 387, + "column": 7 + } + }, + "78": { + "start": { + "line": 341, + "column": 8 + }, + "end": { + "line": 341, + "column": 90 + } + }, + "79": { + "start": { + "line": 341, + "column": 38 + }, + "end": { + "line": 341, + "column": 90 + } + }, + "80": { + "start": { + "line": 343, + "column": 8 + }, + "end": { + "line": 343, + "column": 59 + } + }, + "81": { + "start": { + "line": 344, + "column": 8 + }, + "end": { + "line": 344, + "column": 40 + } + }, + "82": { + "start": { + "line": 345, + "column": 8 + }, + "end": { + "line": 345, + "column": 58 + } + }, + "83": { + "start": { + "line": 346, + "column": 8 + }, + "end": { + "line": 346, + "column": 53 + } + }, + "84": { + "start": { + "line": 348, + "column": 8 + }, + "end": { + "line": 350, + "column": 9 + } + }, + "85": { + "start": { + "line": 349, + "column": 10 + }, + "end": { + "line": 349, + "column": 34 + } + }, + "86": { + "start": { + "line": 351, + "column": 8 + }, + "end": { + "line": 351, + "column": 51 + } + }, + "87": { + "start": { + "line": 353, + "column": 8 + }, + "end": { + "line": 353, + "column": 35 + } + }, + "88": { + "start": { + "line": 354, + "column": 8 + }, + "end": { + "line": 356, + "column": 9 + } + }, + "89": { + "start": { + "line": 355, + "column": 10 + }, + "end": { + "line": 355, + "column": 49 + } + }, + "90": { + "start": { + "line": 358, + "column": 8 + }, + "end": { + "line": 358, + "column": 39 + } + }, + "91": { + "start": { + "line": 359, + "column": 8 + }, + "end": { + "line": 361, + "column": 11 + } + }, + "92": { + "start": { + "line": 363, + "column": 8 + }, + "end": { + "line": 363, + "column": 83 + } + }, + "93": { + "start": { + "line": 367, + "column": 21 + }, + "end": { + "line": 367, + "column": 41 + } + }, + "94": { + "start": { + "line": 368, + "column": 8 + }, + "end": { + "line": 368, + "column": 42 + } + }, + "95": { + "start": { + "line": 370, + "column": 23 + }, + "end": { + "line": 370, + "column": 42 + } + }, + "96": { + "start": { + "line": 371, + "column": 8 + }, + "end": { + "line": 371, + "column": 75 + } + }, + "97": { + "start": { + "line": 372, + "column": 8 + }, + "end": { + "line": 379, + "column": 9 + } + }, + "98": { + "start": { + "line": 374, + "column": 10 + }, + "end": { + "line": 374, + "column": 48 + } + }, + "99": { + "start": { + "line": 375, + "column": 10 + }, + "end": { + "line": 375, + "column": 40 + } + }, + "100": { + "start": { + "line": 380, + "column": 8 + }, + "end": { + "line": 380, + "column": 53 + } + }, + "101": { + "start": { + "line": 382, + "column": 8 + }, + "end": { + "line": 386, + "column": 10 + } + }, + "102": { + "start": { + "line": 389, + "column": 6 + }, + "end": { + "line": 389, + "column": 27 + } + }, + "103": { + "start": { + "line": 390, + "column": 6 + }, + "end": { + "line": 390, + "column": 79 + } + }, + "104": { + "start": { + "line": 391, + "column": 6 + }, + "end": { + "line": 391, + "column": 96 + } + }, + "105": { + "start": { + "line": 395, + "column": 33 + }, + "end": { + "line": 401, + "column": 3 + } + }, + "106": { + "start": { + "line": 396, + "column": 25 + }, + "end": { + "line": 398, + "column": 6 + } + }, + "107": { + "start": { + "line": 399, + "column": 4 + }, + "end": { + "line": 399, + "column": 97 + } + }, + "108": { + "start": { + "line": 400, + "column": 4 + }, + "end": { + "line": 400, + "column": 34 + } + }, + "109": { + "start": { + "line": 403, + "column": 22 + }, + "end": { + "line": 410, + "column": 3 + } + }, + "110": { + "start": { + "line": 404, + "column": 25 + }, + "end": { + "line": 406, + "column": 6 + } + }, + "111": { + "start": { + "line": 407, + "column": 4 + }, + "end": { + "line": 407, + "column": 94 + } + }, + "112": { + "start": { + "line": 408, + "column": 4 + }, + "end": { + "line": 408, + "column": 34 + } + }, + "113": { + "start": { + "line": 409, + "column": 4 + }, + "end": { + "line": 409, + "column": 77 + } + }, + "114": { + "start": { + "line": 413, + "column": 4 + }, + "end": { + "line": 413, + "column": 59 + } + }, + "115": { + "start": { + "line": 414, + "column": 4 + }, + "end": { + "line": 414, + "column": 58 + } + }, + "116": { + "start": { + "line": 417, + "column": 26 + }, + "end": { + "line": 426, + "column": 3 + } + }, + "117": { + "start": { + "line": 418, + "column": 19 + }, + "end": { + "line": 418, + "column": 86 + } + }, + "118": { + "start": { + "line": 419, + "column": 4 + }, + "end": { + "line": 419, + "column": 61 + } + }, + "119": { + "start": { + "line": 420, + "column": 4 + }, + "end": { + "line": 425, + "column": 7 + } + }, + "120": { + "start": { + "line": 429, + "column": 4 + }, + "end": { + "line": 432, + "column": 5 + } + }, + "121": { + "start": { + "line": 430, + "column": 21 + }, + "end": { + "line": 430, + "column": 52 + } + }, + "122": { + "start": { + "line": 431, + "column": 6 + }, + "end": { + "line": 431, + "column": 89 + } + }, + "123": { + "start": { + "line": 436, + "column": 4 + }, + "end": { + "line": 442, + "column": 5 + } + }, + "124": { + "start": { + "line": 437, + "column": 23 + }, + "end": { + "line": 437, + "column": 42 + } + }, + "125": { + "start": { + "line": 438, + "column": 6 + }, + "end": { + "line": 438, + "column": 39 + } + }, + "126": { + "start": { + "line": 439, + "column": 6 + }, + "end": { + "line": 441, + "column": 9 + } + }, + "127": { + "start": { + "line": 446, + "column": 4 + }, + "end": { + "line": 446, + "column": 31 + } + }, + "128": { + "start": { + "line": 447, + "column": 4 + }, + "end": { + "line": 461, + "column": 6 + } + }, + "129": { + "start": { + "line": 485, + "column": 8 + }, + "end": { + "line": 485, + "column": 18 + } + }, + "130": { + "start": { + "line": 487, + "column": 78 + }, + "end": { + "line": 487, + "column": 88 + } + }, + "131": { + "start": { + "line": 488, + "column": 68 + }, + "end": { + "line": 488, + "column": 82 + } + }, + "132": { + "start": { + "line": 489, + "column": 34 + }, + "end": { + "line": 489, + "column": 63 + } + }, + "133": { + "start": { + "line": 490, + "column": 21 + }, + "end": { + "line": 490, + "column": 36 + } + }, + "134": { + "start": { + "line": 491, + "column": 27 + }, + "end": { + "line": 491, + "column": 44 + } + }, + "135": { + "start": { + "line": 492, + "column": 21 + }, + "end": { + "line": 492, + "column": 54 + } + }, + "136": { + "start": { + "line": 493, + "column": 4 + }, + "end": { + "line": 736, + "column": 6 + } + }, + "137": { + "start": { + "line": 537, + "column": 18 + }, + "end": { + "line": 545, + "column": 20 + } + }, + "138": { + "start": { + "line": 551, + "column": 16 + }, + "end": { + "line": 557, + "column": 18 + } + }, + "139": { + "start": { + "line": 563, + "column": 18 + }, + "end": { + "line": 563, + "column": 56 + } + }, + "140": { + "start": { + "line": 595, + "column": 18 + }, + "end": { + "line": 595, + "column": 59 + } + }, + "141": { + "start": { + "line": 596, + "column": 18 + }, + "end": { + "line": 600, + "column": 20 + } + }, + "142": { + "start": { + "line": 603, + "column": 18 + }, + "end": { + "line": 603, + "column": 47 + } + }, + "143": { + "start": { + "line": 609, + "column": 18 + }, + "end": { + "line": 609, + "column": 64 + } + }, + "144": { + "start": { + "line": 659, + "column": 16 + }, + "end": { + "line": 662, + "column": 19 + } + }, + "145": { + "start": { + "line": 667, + "column": 18 + }, + "end": { + "line": 674, + "column": 20 + } + }, + "146": { + "start": { + "line": 681, + "column": 16 + }, + "end": { + "line": 681, + "column": 51 + } + }, + "147": { + "start": { + "line": 706, + "column": 20 + }, + "end": { + "line": 708, + "column": 23 + } + }, + "148": { + "start": { + "line": 709, + "column": 20 + }, + "end": { + "line": 709, + "column": 113 + } + }, + "149": { + "start": { + "line": 719, + "column": 20 + }, + "end": { + "line": 721, + "column": 23 + } + }, + "150": { + "start": { + "line": 722, + "column": 20 + }, + "end": { + "line": 722, + "column": 114 + } + }, + "151": { + "start": { + "line": 740, + "column": 24 + }, + "end": { + "line": 748, + "column": 1 + } + }, + "152": { + "start": { + "line": 741, + "column": 2 + }, + "end": { + "line": 747, + "column": 4 + } + }, + "153": { + "start": { + "line": 750, + "column": 27 + }, + "end": { + "line": 752, + "column": 2 + } + }, + "154": { + "start": { + "line": 750, + "column": 42 + }, + "end": { + "line": 752, + "column": 1 + } + } + } +} diff --git a/packages/canyon-data/src/utils/test/utils.test.ts b/packages/canyon-data/src/utils/test/utils.test.ts new file mode 100644 index 00000000..29b039f4 --- /dev/null +++ b/packages/canyon-data/src/utils/test/utils.test.ts @@ -0,0 +1,7 @@ +import { expect, test } from 'vitest' +import {calculateNewLineCoverageForSingleFile} from "../line.ts"; +import mock from './mock.json' +test('测试变更行覆盖率', () => { + // @ts-ignore + expect(calculateNewLineCoverageForSingleFile(mock,[1,2,77,78])).toMatchObject({ total: 2, covered: 1, skipped: 0, pct: 50 }) +}) diff --git a/packages/canyon-data/vitest.config.ts b/packages/canyon-data/vitest.config.ts new file mode 100644 index 00000000..642d3b66 --- /dev/null +++ b/packages/canyon-data/vitest.config.ts @@ -0,0 +1,10 @@ +// vitest.config.ts +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + coverage: { + provider: 'istanbul', // or 'v8' + }, + }, +})