C++: Add some test cases for the mirror case, with <=.

This commit is contained in:
Geoffrey White
2020-02-27 14:30:35 +00:00
parent 3d8633f701
commit dcf2f7f19c
2 changed files with 14 additions and 0 deletions

View File

@@ -130,4 +130,11 @@ void myFunction() {
}
if ((signed int)(unsigned char)(signed char)si >= 0) { // violation
}
if (ui <= 0) {
}
if (0 <= ui) { // violation [NOT DETECTED]
}
if (0 < ui) {
}
}

View File

@@ -130,4 +130,11 @@ void myFunction() {
}
if ((signed int)(unsigned char)(signed char)si >= 0) { // violation
}
if (ui <= 0) {
}
if (0 <= ui) { // violation [NOT DETECTED]
}
if (0 < ui) {
}
}