func TestPrioritySort(t *testing.T) {
	m := MarksPriority{
		&Mark{Code: "last", Download: &Download{Priority: 0}},
		&Mark{Code: "first", Download: &Download{Priority: 1000}},
		&Mark{Code: "second", Download: &Download{Priority: 100}},
	}

	sort.Sort(sort.Reverse(m))

	if m[0].GetCode() != "first" {
		t.Error("wrong sort order")
	}

	if m[2].GetCode() != "last" {
		t.Error("wrong sort order")
	}
}
// TestPrioritySort checks the sort by download priority for marks.
TestPrioritySort checks the sort by download priority for marks.
// TestPrioritySort checks the sort by download priority for marks .
func TestPrioritySort(t *testing.T) {
	m := MarksPriority{
		&Mark{Code: "last", Download: &Download{Priority: 0}},
		&Mark{Code: "first", Download: &Download{Priority: 1000}},
		&Mark{Code: "second", Download: &Download{Priority: 100}},
	}
	sort.Sort(sort.Reverse(m))
	if m[0].GetCode() != "first" {
		t.Error("wrong sort order")
	}
	if m[2].GetCode() != "last" {
		t.Error("wrong sort order")
	}
}
func TestPrioritySort ( t * testing . T ) { m := MarksPriority { & Mark { Code : " " , Download : & Download { Priority : 0 } } , & Mark { Code : " " , Download : & Download { Priority : 1000 } } , & Mark { Code : " " , Download : & Download { Priority : 100 } } , } sort . Sort ( sort . Reverse ( m ) ) if m [ 0 ] . GetCode ( ) != " " { t . Error ( " " ) } if m [ 2 ] . GetCode ( ) != " " { t . Error ( " " ) } }
TestPrioritySort checks the sort by download priority for marks.
TestPrioritySort checks the sort by download priority for marks .