Added 3 tests proving that new ternary improvement only affects real booleans
This commit is contained in:
parent
63b05c2bc3
commit
1ba6594f62
|
|
@ -343,6 +343,14 @@ cond_8: {
|
||||||
} else {
|
} else {
|
||||||
a = true;
|
a = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// don't compress these
|
||||||
|
a = condition ? 1 : false;
|
||||||
|
|
||||||
|
a = !condition ? true : 0;
|
||||||
|
|
||||||
|
a = condition ? 1 : 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
a = !!condition;
|
a = !!condition;
|
||||||
|
|
@ -353,5 +361,8 @@ cond_8: {
|
||||||
a = !!condition;
|
a = !!condition;
|
||||||
a = !condition();
|
a = !condition();
|
||||||
a = !condition;
|
a = !condition;
|
||||||
|
a = condition ? 1 : false;
|
||||||
|
a = condition ? 0 : true;
|
||||||
|
a = condition ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user