compare boolean versus integer ops

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@783 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 0f5e9f630c
commit 0b1fe6ee9c
  1. 18
      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;
}

Loading…
Cancel
Save