2020-08-21 16:48:27 +00:00
|
|
|
package testdata
|
|
|
|
|
2021-04-23 12:06:05 +00:00
|
|
|
// Equal --
|
2020-08-21 16:48:27 +00:00
|
|
|
func Equal() {
|
|
|
|
x := []string{"a"}
|
|
|
|
if len(x) == len(x) { // want "Boolean expression has identical expressions on both sides. The result is always true."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-23 12:06:05 +00:00
|
|
|
// NotEqual --
|
2020-08-21 16:48:27 +00:00
|
|
|
func NotEqual() {
|
|
|
|
x := []string{"a"}
|
|
|
|
if len(x) != len(x) { // want "Boolean expression has identical expressions on both sides. The result is always true."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-23 12:06:05 +00:00
|
|
|
// GreaterThanOrEqual --
|
2020-08-21 16:48:27 +00:00
|
|
|
func GreaterThanOrEqual() {
|
|
|
|
x := []string{"a"}
|
|
|
|
if len(x) >= len(x) { // want "Boolean expression has identical expressions on both sides. The result is always true."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-23 12:06:05 +00:00
|
|
|
// LessThanOrEqual --
|
2020-08-21 16:48:27 +00:00
|
|
|
func LessThanOrEqual() {
|
|
|
|
x := []string{"a"}
|
|
|
|
if len(x) <= len(x) { // want "Boolean expression has identical expressions on both sides. The result is always true."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-23 12:06:05 +00:00
|
|
|
// GreaterThan --
|
2020-08-21 16:48:27 +00:00
|
|
|
func GreaterThan() {
|
|
|
|
x := []string{"a"}
|
|
|
|
if len(x) > len(x) { // want "Boolean expression has identical expressions on both sides. The result is always false."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-23 12:06:05 +00:00
|
|
|
// LessThan --
|
2020-08-21 16:48:27 +00:00
|
|
|
func LessThan() {
|
|
|
|
x := []string{"a"}
|
|
|
|
if len(x) < len(x) { // want "Boolean expression has identical expressions on both sides. The result is always false."
|
|
|
|
}
|
|
|
|
}
|