Skip to content

Fix tests of lookup table generator #139463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robincaloudis
Copy link
Contributor

@robincaloudis robincaloudis commented May 11, 2025

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.

@robincaloudis robincaloudis changed the title Provide qualified symbol as argument Fix tests of lookup table generator May 11, 2025
Copy link

github-actions bot commented May 11, 2025

✅ With the latest revision this PR passed the Python code formatter.

@robincaloudis robincaloudis marked this pull request as ready for review May 11, 2025 19:56
@llvmbot llvmbot added the clang Clang issues not falling into any other category label May 11, 2025
@llvmbot
Copy link
Member

llvmbot commented May 11, 2025

@llvm/pr-subscribers-clang

Author: Robin Caloudis (robincaloudis)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/139463.diff

1 Files Affected:

  • (modified) clang/tools/include-mapping/test.py (+9-5)
diff --git a/clang/tools/include-mapping/test.py b/clang/tools/include-mapping/test.py
index eef328381f2bb..81803855dac8f 100755
--- a/clang/tools/include-mapping/test.py
+++ b/clang/tools/include-mapping/test.py
@@ -52,7 +52,7 @@ def testParseSymbolPage_SingleHeader(self):
   </tr>
 </tbody></table>
 """
-        self.assertEqual(_ParseSymbolPage(html, "foo"), set(["<cmath>"]))
+        self.assertEqual(_ParseSymbolPage(html, "foo", "foo"), set(["<cmath>"]))
 
     def testParseSymbolPage_MulHeaders(self):
         #  Defined in header <cstddef>
@@ -92,7 +92,9 @@ def testParseSymbolPage_MulHeaders(self):
   </tr>
 </tbody></table>
 """
-        self.assertEqual(_ParseSymbolPage(html, "foo"), set(["<cstdio>", "<cstdlib>"]))
+        self.assertEqual(
+            _ParseSymbolPage(html, "foo", "foo"), set(["<cstdio>", "<cstdlib>"])
+        )
 
     def testParseSymbolPage_MulHeadersInSameDiv(self):
         # Multile <code> blocks in a Div.
@@ -118,7 +120,7 @@ def testParseSymbolPage_MulHeadersInSameDiv(self):
 </tbody></table>
 """
         self.assertEqual(
-            _ParseSymbolPage(html, "foo"), set(["<algorithm>", "<utility>"])
+            _ParseSymbolPage(html, "foo", "foo"), set(["<algorithm>", "<utility>"])
         )
 
     def testParseSymbolPage_MulSymbolsInSameTd(self):
@@ -142,8 +144,10 @@ def testParseSymbolPage_MulSymbolsInSameTd(self):
 </tr>
 </tbody></table>
 """
-        self.assertEqual(_ParseSymbolPage(html, "int8_t"), set(["<cstdint>"]))
-        self.assertEqual(_ParseSymbolPage(html, "int16_t"), set(["<cstdint>"]))
+        self.assertEqual(_ParseSymbolPage(html, "int8_t", "int8_t"), set(["<cstdint>"]))
+        self.assertEqual(
+            _ParseSymbolPage(html, "int16_t", "int16_t"), set(["<cstdint>"])
+        )
 
 
 if __name__ == "__main__":

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants