(info: CompilerInfo, baseFolder: string)
| 190 | } |
| 191 | |
| 192 | async function testParseSmaliForLineNumbers(info: CompilerInfo, baseFolder: string) { |
| 193 | const compiler = new Dex2OatCompiler(info, env); |
| 194 | const rawSmaliText = fs.readFileSync(`${baseFolder}/Square.smali`, {encoding: 'utf8'}); |
| 195 | |
| 196 | const dexPcsToLines: Record<string, Record<number, number>> = {}; |
| 197 | compiler.parseSmaliForLineNumbers(dexPcsToLines, rawSmaliText.split(/\n/)); |
| 198 | |
| 199 | expect(Object.keys(dexPcsToLines)).toHaveLength(2); |
| 200 | expect(dexPcsToLines).toHaveProperty('void Square.<init>()', {0: 12, 3: 12}); |
| 201 | expect(dexPcsToLines).toHaveProperty('int Square.square(int)', {0: 14, 1: 14}); |
| 202 | } |
| 203 | |
| 204 | async function testParseSmaliClassWithL(info: CompilerInfo, baseFolder: string) { |
| 205 | const compiler = new Dex2OatCompiler(info, env); |
no test coverage detected