Add UT test to TestMax if equal scenario

pull/8/head
jianglingxia 2018-03-01 10:30:06 +08:00
parent 07240b7166
commit 996cf36df7
1 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,11 @@ func TestMax(t *testing.T) {
b: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
expected: api.ResourceList{api.ResourceCPU: resource.MustParse("150m")},
},
"matching-equal": {
a: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
b: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
expected: api.ResourceList{api.ResourceCPU: resource.MustParse("100m")},
},
}
for testName, testCase := range testCases {
sum := Max(testCase.a, testCase.b)