File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -84,21 +84,21 @@ func (info SortState) NextTypeSort() string {
8484func (info SortState ) NextSizeSort () string {
8585 var nextKey byte
8686 switch info .key {
87- case sizeAsc :
88- nextKey = sizeDesc
89- default :
87+ case sizeDesc :
9088 nextKey = sizeAsc
89+ default :
90+ nextKey = sizeDesc
9191 }
9292 return info .mergeDirWithKey (nextKey )
9393}
9494
9595func (info SortState ) NextTimeSort () string {
9696 var nextKey byte
9797 switch info .key {
98- case timeAsc :
99- nextKey = timeDesc
100- default :
98+ case timeDesc :
10199 nextKey = timeAsc
100+ default :
101+ nextKey = timeDesc
102102 }
103103 return info .mergeDirWithKey (nextKey )
104104}
Original file line number Diff line number Diff line change @@ -52,24 +52,24 @@ func TestSortState_KeyState(t *testing.T) {
5252 }
5353
5454 sortBy = state .NextSizeSort ()
55- if sortBy != "/s " {
55+ if sortBy != "/S " {
5656 t .Error (sortBy )
5757 }
5858
5959 sortBy = state .NextTimeSort ()
60- if sortBy != "/t " {
60+ if sortBy != "/T " {
6161 t .Error (sortBy )
6262 }
6363
6464 state .dirSort = dirSortMixed
6565 sortBy = state .NextTimeSort ()
66- if sortBy != "t " {
66+ if sortBy != "T " {
6767 t .Error (sortBy )
6868 }
6969
70- state .key = 't '
70+ state .key = 'T '
7171 sortBy = state .NextTimeSort ()
72- if sortBy != "T " {
72+ if sortBy != "t " {
7373 t .Error (sortBy )
7474 }
7575}
You can’t perform that action at this time.
0 commit comments