Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation tests for boolean expressions #1505

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static void main(String[] args) {
if (t() & t()) { // assertFullyCovered(1, 1)
nop();
}
nop(f() & f()); // assertFullyCovered()

/* 4. Conditional And */
if (f() && f()) { // assertPartlyCovered(3, 1)
Expand All @@ -60,6 +61,8 @@ public static void main(String[] args) {
if (t() && t()) { // assertFullyCovered(2, 2)
nop();
}
nop(f() && f()); // assertPartlyCovered(3, 1)
nop(t() && f()); // assertPartlyCovered(2, 2)

/* 5. Or */
if (f() | f()) { // assertFullyCovered(1, 1)
Expand All @@ -74,6 +77,7 @@ public static void main(String[] args) {
if (t() | t()) { // assertFullyCovered(1, 1)
nop();
}
nop(f() | f()); // assertFullyCovered()

/* 6. Conditional Or */
if (f() || f()) { // assertFullyCovered(2, 2)
Expand All @@ -88,6 +92,8 @@ public static void main(String[] args) {
if (t() || t()) { // assertPartlyCovered(3, 1)
nop();
}
nop(t() || f()); // assertPartlyCovered(3, 1)
nop(f() || f()); // assertPartlyCovered(2, 2)

/* 7. Exclusive Or */
if (f() ^ f()) { // assertFullyCovered(1, 1)
Expand All @@ -102,6 +108,7 @@ public static void main(String[] args) {
if (t() ^ t()) { // assertFullyCovered(1, 1)
nop();
}
nop(f() ^ f()); // assertFullyCovered()

/* 8. Conditional Operator */
nop(t() ? i1() : i2()); // assertPartlyCovered(1, 1)
Expand Down