Runs tests in order by name

This commit is contained in:
Jakub Matys 2018-10-04 10:41:43 +02:00
parent 911c62fb32
commit 37c66e81ba

View File

@ -16,6 +16,7 @@ import (
"os"
"path/filepath"
"reflect"
"sort"
"testing"
"github.com/jakm/btcutil/chaincfg"
@ -36,7 +37,14 @@ func runIntegrationTests(t *testing.T) {
t.Fatal(err)
}
for coin, cfg := range tests {
keys := make([]string, 0, len(tests))
for k := range tests {
keys = append(keys, k)
}
sort.Strings(keys)
for _, coin := range keys {
cfg := tests[coin]
t.Run(coin, func(t *testing.T) { runTests(t, coin, cfg) })
}