Fix tests of lookup table generator (#139463)

## Why
In
https://github.com/llvm/llvm-project/pull/113612/files#diff-ada12e18f3e902b41b6989b46455c4e32656276e59907026e2464cf57d10d583,
the parameter `qual_name` was introduced. However, the tests have not
been adopted accordingly and hence cannot be executed.

## What
Fix the execution of tests by providing the missing argument.
This commit is contained in:
Robin Caloudis 2025-05-27 13:45:11 +02:00 committed by GitHub
parent f30a85b700
commit b56b4e02b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,7 +52,7 @@ class TestStdGen(unittest.TestCase):
</tr> </tr>
</tbody></table> </tbody></table>
""" """
self.assertEqual(_ParseSymbolPage(html, "foo"), set(["<cmath>"])) self.assertEqual(_ParseSymbolPage(html, "foo", "foo"), set(["<cmath>"]))
def testParseSymbolPage_MulHeaders(self): def testParseSymbolPage_MulHeaders(self):
# Defined in header <cstddef> # Defined in header <cstddef>
@ -92,7 +92,9 @@ class TestStdGen(unittest.TestCase):
</tr> </tr>
</tbody></table> </tbody></table>
""" """
self.assertEqual(_ParseSymbolPage(html, "foo"), set(["<cstdio>", "<cstdlib>"])) self.assertEqual(
_ParseSymbolPage(html, "foo", "foo"), set(["<cstdio>", "<cstdlib>"])
)
def testParseSymbolPage_MulHeadersInSameDiv(self): def testParseSymbolPage_MulHeadersInSameDiv(self):
# Multile <code> blocks in a Div. # Multile <code> blocks in a Div.
@ -118,7 +120,7 @@ class TestStdGen(unittest.TestCase):
</tbody></table> </tbody></table>
""" """
self.assertEqual( self.assertEqual(
_ParseSymbolPage(html, "foo"), set(["<algorithm>", "<utility>"]) _ParseSymbolPage(html, "foo", "foo"), set(["<algorithm>", "<utility>"])
) )
def testParseSymbolPage_MulSymbolsInSameTd(self): def testParseSymbolPage_MulSymbolsInSameTd(self):
@ -142,8 +144,10 @@ class TestStdGen(unittest.TestCase):
</tr> </tr>
</tbody></table> </tbody></table>
""" """
self.assertEqual(_ParseSymbolPage(html, "int8_t"), set(["<cstdint>"])) self.assertEqual(_ParseSymbolPage(html, "int8_t", "int8_t"), set(["<cstdint>"]))
self.assertEqual(_ParseSymbolPage(html, "int16_t"), set(["<cstdint>"])) self.assertEqual(
_ParseSymbolPage(html, "int16_t", "int16_t"), set(["<cstdint>"])
)
if __name__ == "__main__": if __name__ == "__main__":