Skip to content

Commit 43beb67

Browse files
committed
Update test
1 parent ff87ca4 commit 43beb67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tools/cases_generator/test_generator.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -503,20 +503,20 @@ def test_register():
503503

504504
def test_cond_effect():
505505
input = """
506-
inst(OP, (aa, input if (oparg & 1), cc -- xx, output if (oparg & 2), zz)) {
506+
inst(OP, (aa, input if ((oparg & 1) == 1), cc -- xx, output if (oparg & 2), zz)) {
507507
output = spam(oparg, input);
508508
}
509509
"""
510510
output = """
511511
TARGET(OP) {
512512
PyObject *cc = PEEK(1);
513-
PyObject *input = (oparg & 1) ? PEEK(1 + ((oparg & 1) ? 1 : 0)) : NULL;
514-
PyObject *aa = PEEK(2 + ((oparg & 1) ? 1 : 0));
513+
PyObject *input = ((oparg & 1) == 1) ? PEEK(1 + (((oparg & 1) == 1) ? 1 : 0)) : NULL;
514+
PyObject *aa = PEEK(2 + (((oparg & 1) == 1) ? 1 : 0));
515515
PyObject *xx;
516516
PyObject *output = NULL;
517517
PyObject *zz;
518518
output = spam(oparg, input);
519-
STACK_SHRINK(((oparg & 1) ? 1 : 0));
519+
STACK_SHRINK((((oparg & 1) == 1) ? 1 : 0));
520520
STACK_GROW(((oparg & 2) ? 1 : 0));
521521
POKE(1, zz);
522522
if (oparg & 2) { POKE(1 + ((oparg & 2) ? 1 : 0), output); }

0 commit comments

Comments
 (0)