(title, stdout)
| 21 | |
| 22 | |
| 23 | def __get_debug_section(title, stdout): |
| 24 | s = re.sub(r'0x[0-9a-fA-F]+', '0x12345678', stdout) |
| 25 | s = re.sub(r'nestedIn: Struct', 'nestedIn: Class', s) |
| 26 | s = re.sub(r'classDef: struct', 'classDef: class', s) |
| 27 | s = re.sub(r'isInline: [a-z]+', 'isInline: ---', s) |
| 28 | s = re.sub(r'needInitialization: .*', 'needInitialization: ---', s) |
| 29 | s = re.sub(r'functionOf: .*', 'functionOf: ---', s) |
| 30 | s = re.sub(r'0x12345678 Struct', '0x12345678 Class', s) |
| 31 | |
| 32 | if title == '##AST': |
| 33 | # TODO set types |
| 34 | s = re.sub(r"return '[a-zA-Z0-9: *]+'", "return", s) |
| 35 | |
| 36 | pos1 = s.find(title) |
| 37 | assert pos1 > 0, 'title not found' |
| 38 | pos1 = s.find('\n', pos1) + 1 |
| 39 | assert pos1 > 0 |
| 40 | pos2 = s.find("\n##", pos1) |
| 41 | if pos2 < 0: |
| 42 | return s[pos1:] |
| 43 | return s[pos1:pos2-1] |
| 44 | |
| 45 | |
| 46 | def __check_symbol_database(tmpdir, code): |
no test coverage detected