File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func TestDivide(t *testing.T) {
3232 expected Option
3333 }{
3434 {
35- caseName : "ContentLength:5/5 " ,
35+ caseName : "ContentLength and Concurrency is same value " ,
3636 concurrency : 5 ,
3737 expected : Option {
3838 URL : url ,
@@ -48,7 +48,7 @@ func TestDivide(t *testing.T) {
4848 },
4949 },
5050 {
51- caseName : "ContentLength:5/1 " ,
51+ caseName : "One Thread " ,
5252 concurrency : 1 ,
5353 expected : Option {
5454 URL : url ,
@@ -60,7 +60,20 @@ func TestDivide(t *testing.T) {
6060 },
6161 },
6262 {
63- caseName : "ContentLength:5/10" ,
63+ caseName : "Remainder:ContentLength%Concurrency!=0" ,
64+ concurrency : 2 ,
65+ expected : Option {
66+ URL : url ,
67+ ContentLength : contentLength ,
68+ Concurrency : 2 ,
69+ Units : []Unit {
70+ {TempFileName : "0_test.iso" , RangeStart : 0 , RangeEnd : 1 },
71+ {TempFileName : "1_test.iso" , RangeStart : 2 , RangeEnd : 4 },
72+ },
73+ },
74+ },
75+ {
76+ caseName : "Concurrency exceed the contentLength." ,
6477 concurrency : 10 ,
6578 expected : Option {
6679 URL : url ,
You can’t perform that action at this time.
0 commit comments