This commit is contained in:
Audrius Butkevicius
2016-03-06 20:32:10 +00:00
committed by Jakob Borg
parent dd9a4e044a
commit a8ffde6f21
12 changed files with 641 additions and 51 deletions

View File

@@ -13,13 +13,13 @@ import (
"io"
"os"
"path/filepath"
"reflect"
"runtime"
rdebug "runtime/debug"
"sort"
"sync"
"testing"
"github.com/d4l3k/messagediff"
"github.com/syncthing/syncthing/lib/ignore"
"github.com/syncthing/syncthing/lib/osutil"
"github.com/syncthing/syncthing/lib/protocol"
@@ -120,8 +120,8 @@ func TestWalk(t *testing.T) {
sort.Sort(fileList(tmp))
files := fileList(tmp).testfiles()
if !reflect.DeepEqual(files, testdata) {
t.Errorf("Walk returned unexpected data\nExpected: %v\nActual: %v", testdata, files)
if diff, equal := messagediff.PrettyDiff(files, testdata); !equal {
t.Errorf("Walk returned unexpected data. Diff:\n%s", diff)
}
}