func TestQuantityAddZeroPreservesSuffix(t *testing.T) {
	testValues := []string{"100m", "1Gi"}
	zero := MustParse("0")
	for _, testValue := range testValues {
		value := MustParse(testValue)
		v1 := value.DeepCopy()
		// ensure non-zero + zero = non-zero (suffix preserved)
		v1.Add(zero)
		// ensure zero + non-zero = non-zero (suffix preserved)
		v2 := zero.DeepCopy()
		v2.Add(value)

		if v1.String() != testValue {
			t.Errorf("Expected %v, actual %v", testValue, v1.String())
			continue
		}
		if v2.String() != testValue {
			t.Errorf("Expected %v, actual %v", testValue, v2.String())
		}
	}
}
// TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved
// independent of the order of operations when adding a zero and non-zero val
TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved
independent of the order of operations when adding a zero and non-zero val
// TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved // independent of the order of operations when adding a zero and non - zero val
func TestQuantityAddZeroPreservesSuffix(t *testing.T) {
	testValues := []string{"100m", "1Gi"}
	zero := MustParse("0")
	for _, testValue := range testValues {
		value := MustParse(testValue)
		v1 := value.DeepCopy()
		v1.Add(zero)
		v2 := zero.DeepCopy()
		v2.Add(value)
		if v1.String() != testValue {
			t.Errorf("Expected %v, actual %v", testValue, v1.String())
			continue
		}
		if v2.String() != testValue {
			t.Errorf("Expected %v, actual %v", testValue, v2.String())
		}
	}
}
func TestQuantityAddZeroPreservesSuffix ( t * testing . T ) { testValues := [ ] string { " " , " " } zero := MustParse ( " " ) for _ , testValue := range testValues { value := MustParse ( testValue ) v1 := value . DeepCopy ( ) v1 . Add ( zero ) v2 := zero . DeepCopy ( ) v2 . Add ( value ) if v1 . String ( ) != testValue { t . Errorf ( " " , testValue , v1 . String ( ) ) continue } if v2 . String ( ) != testValue { t . Errorf ( " " , testValue , v2 . String ( ) ) } } }
TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved
independent of the order of operations when adding a zero and non-zero val
TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved independent of the order of operations when adding a zero and non - zero val
// ensure non-zero + zero = non-zero (suffix preserved) // ensure zero + non-zero = non-zero (suffix preserved)