MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / testParseSmaliForLineNumbers

Function testParseSmaliForLineNumbers

test/android-tests.ts:192–202  ·  view source on GitHub ↗
(info: CompilerInfo, baseFolder: string)

Source from the content-addressed store, hash-verified

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);

Callers 1

android-tests.tsFile · 0.85

Calls 1

Tested by

no test coverage detected