mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/specconv: test nits
Commit643f8a2b40renamed isValidName to checkPropertyName, but fell short of renaming its test and benchmark. Fix that. Fixes:643f8a2b40Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -762,7 +762,7 @@ func TestInitSystemdProps(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsValidName(t *testing.T) {
|
||||
func TestCheckPropertyName(t *testing.T) {
|
||||
testCases := []struct {
|
||||
in string
|
||||
valid bool
|
||||
@@ -787,7 +787,7 @@ func TestIsValidName(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkIsValidName(b *testing.B) {
|
||||
func BenchmarkCheckPropertyName(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
for _, s := range []string{"", "xx", "xxx", "someValidName", "A name", "Кир", "მადლობა", "合い言葉"} {
|
||||
_ = checkPropertyName(s)
|
||||
|
||||
Reference in New Issue
Block a user