Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 368227f

Browse files
author
Max Schaefer
committed
Fix tests for NegativeLengthCheck.
1 parent 149ceda commit 368227f

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

ql/test/query-tests/RedundantCode/NegativeLengthCheck/NegativeLengthCheck.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
| main.go:18:5:18:22 | ...<=... | 'len' is always non-negative, and hence cannot be less than -1. |
55
| main.go:22:5:22:22 | ...==... | 'len' is always non-negative, and hence cannot equal -1. |
66
| main.go:28:9:28:13 | ...<... | This unsigned value is always non-negative, and hence cannot be less than 0. |
7-
| main.go:36:9:36:15 | ...==... | This unsigned value is always non-negative, and hence cannot equal -1. |

ql/test/query-tests/RedundantCode/NegativeLengthCheck/main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,3 @@ func checkNegative(x uint) bool {
3131
func checkNonPositive(x uint) bool {
3232
return x <= 0 // OK
3333
}
34-
35-
func checkIsMinusOne(x uint) bool {
36-
return x == -1 // NOT OK
37-
}

0 commit comments

Comments
 (0)