summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-02-27 10:51:26 (GMT)
committerGitHub <noreply@github.com>2024-02-27 10:51:26 (GMT)
commit10fbcd6c5dc25bfe14e02fd93ef93498a393860c (patch)
tree408fd5d2857188a57f2fbefb5661dd0067b3d7e0 /Lib/test
parentaf5f9d682c20c951b90e3c020eeccac386c9bbb0 (diff)
downloadcpython-10fbcd6c5dc25bfe14e02fd93ef93498a393860c.zip
cpython-10fbcd6c5dc25bfe14e02fd93ef93498a393860c.tar.gz
cpython-10fbcd6c5dc25bfe14e02fd93ef93498a393860c.tar.bz2
GH-115816: Make tier2 optimizer symbols testable, and add a few tests. (GH-115953)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_generated_cases.py4
-rw-r--r--Lib/test/test_optimizer.py7
2 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_generated_cases.py b/Lib/test/test_generated_cases.py
index 6a55868..6017758 100644
--- a/Lib/test/test_generated_cases.py
+++ b/Lib/test/test_generated_cases.py
@@ -900,7 +900,7 @@ class TestGeneratedAbstractCases(unittest.TestCase):
case OP2: {
_Py_UOpsSymType *out;
- out = sym_new_unknown(ctx);
+ out = _Py_uop_sym_new_unknown(ctx);
if (out == NULL) goto out_of_space;
stack_pointer[-1] = out;
break;
@@ -925,7 +925,7 @@ class TestGeneratedAbstractCases(unittest.TestCase):
output = """
case OP: {
_Py_UOpsSymType *out;
- out = sym_new_unknown(ctx);
+ out = _Py_uop_sym_new_unknown(ctx);
if (out == NULL) goto out_of_space;
stack_pointer[-1] = out;
break;
diff --git a/Lib/test/test_optimizer.py b/Lib/test/test_optimizer.py
index dfea8be..899a450 100644
--- a/Lib/test/test_optimizer.py
+++ b/Lib/test/test_optimizer.py
@@ -77,5 +77,12 @@ class TestRareEventCounters(unittest.TestCase):
_testinternalcapi.get_rare_event_counters()["func_modification"]
)
+
+class TestOptimizerSymbols(unittest.TestCase):
+
+ def test_optimizer_symbols(self):
+ _testinternalcapi.uop_symbols_test()
+
+
if __name__ == "__main__":
unittest.main()