5a652190d9
* Upgrade go-ethereum to v1.8 * Add Node Info for parity nodes * Upgrade start_private_blockchain to use v1.8
23 lines
341 B
Go
23 lines
341 B
Go
package metrics
|
|
|
|
import (
|
|
"sort"
|
|
"testing"
|
|
)
|
|
|
|
func TestMetricsSorting(t *testing.T) {
|
|
var namedMetrics = namedMetricSlice{
|
|
{name: "zzz"},
|
|
{name: "bbb"},
|
|
{name: "fff"},
|
|
{name: "ggg"},
|
|
}
|
|
|
|
sort.Sort(namedMetrics)
|
|
for i, name := range []string{"bbb", "fff", "ggg", "zzz"} {
|
|
if namedMetrics[i].name != name {
|
|
t.Fail()
|
|
}
|
|
}
|
|
}
|