Skip to content

Commit 58017a8

Browse files
committed
Add tests
1 parent d490347 commit 58017a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Python/optimizer_symbols.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,11 @@ _Py_uop_symbols_test(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
874874
_Py_uop_sym_get_const(ctx, _Py_uop_sym_tuple_getitem(ctx, sym, 1)) == val_43,
875875
"tuple item does not match value used to create tuple"
876876
);
877+
sym = _Py_uop_sym_new_type(ctx, &PyTuple_Type);
878+
TEST_PREDICATE(
879+
_Py_uop_sym_is_not_null(_Py_uop_sym_tuple_getitem(ctx, sym, 42)),
880+
"Unknown tuple item is not narrowed to non-NULL"
881+
);
877882
JitOptSymbol *value = _Py_uop_sym_new_type(ctx, &PyBool_Type);
878883
sym = _Py_uop_sym_new_truthiness(ctx, value, false);
879884
TEST_PREDICATE(_Py_uop_sym_matches_type(sym, &PyBool_Type), "truthiness is not boolean");

0 commit comments

Comments
 (0)