From 0b1fe6ee9c97accf6934e86cb8116791fac478d8 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 5 May 1999 21:01:42 +0000 Subject: [PATCH] compare boolean versus integer ops git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@783 379699f6-c40d-0410-875b-85095c16579e --- jode/test/LocalTypes.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/jode/test/LocalTypes.java b/jode/test/LocalTypes.java index afebd83..fecb02b 100644 --- a/jode/test/LocalTypes.java +++ b/jode/test/LocalTypes.java @@ -64,23 +64,29 @@ public class LocalTypes { public void arithTest() { int a=1,b=2; - boolean x = true,y = false; + boolean xb = true,yb = false; + int xi = 1,yi = 0; int c=0; arithTest(); - if (x & y) { + if ((xb & yb) || (xi & yi) != 0) { c = 5; arithTest(); - x &= y; + xb &= yb; + xi &= yi; arithTest(); - x = x | y; + xb = xb | yb; + xi = xi | yi; arithTest(); - x ^= y; + xb ^= yb; + xi ^= yi; arithTest(); - x = x && y; + xb = xb && yb; + xi = (xi != 0) && (yi != 0) ? 1 : 0; arithTest(); b <<= a; b <<= c; } + xi++; a&=b; }