ray/deploy/ray-operator/controllers/utils/util_test.go

18 lines
204 B
Go
Raw Normal View History

2020-01-10 06:16:08 +08:00
package utils
import "testing"
func TestBefore(t *testing.T) {
2020-03-09 11:23:46 -07:00
if Before("a", "b") != "" {
2020-01-10 06:16:08 +08:00
t.Fail()
}
2020-03-09 11:23:46 -07:00
if Before("aaa", "a") != "" {
2020-01-10 06:16:08 +08:00
t.Fail()
}
2020-03-09 11:23:46 -07:00
if Before("aab", "b") != "aa" {
2020-01-10 06:16:08 +08:00
t.Fail()
}
}