// getSizeRangesIntersection takes two instances of storage size ranges and determines the // intersection of the intervals (if it exists) and return the minimum of the intersection // to be used as the claim size for the test. // if value not set, that means there's no minimum or maximum size limitation and we set default size for it. // Considerate all corner case as followed: // first: A,B is regular value and ? means unspecified // second: C,D is regular value and ? means unspecified // ---------------------------------------------------------------- // | \second| min=C,max=?| min=C,max=D| min=?,max=D| min=?,max=?| // |first\ | | | | | // |---------------------------------------------------------------- // |min=A,max=?| #1 | #2 | #3 | #4 | // ----------------------------------------------------------------- // |min=A,max=B| #5 | #6 | #7 | #8 | // ----------------------------------------------------------------- // |min=?,max=B| #9 | #10 | #11 | #12 | // ----------------------------------------------------------------- // |min=?,max=?| #13 | #14 | #15 | #16 | // |---------------------------------------------------------------| func Test_GetSizeRangesIntersection(t *testing.T) { … }