Skip to content

Commit

Permalink
fixup! feat: use more specific codes during detect
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
  • Loading branch information
jabrown85 committed Jul 28, 2020
1 parent fd0825b commit 3a4427b
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"reflect"
"runtime"
"strings"
"testing"

Expand Down Expand Up @@ -177,12 +178,22 @@ func testDetector(t *testing.T, when spec.G, it spec.S) {
t.Fatalf("Unexpected error:\n%s\n", err)
}

if s := allLogs(logHandler); !strings.HasSuffix(s,
"======== Results ========\n"+
"pass: A@v1\n"+
"err: B@v1 (255)\n",
) {
t.Fatalf("Unexpected log:\n%s\n", s)
if runtime.GOOS == "windows" {
if s := allLogs(logHandler); !strings.HasSuffix(s,
"======== Results ========\n"+
"pass: A@v1\n"+
"err: B@v1 (4294967295)\n",
) {
t.Fatalf("Unexpected log:\n%s\n", s)
}
} else {
if s := allLogs(logHandler); !strings.HasSuffix(s,
"======== Results ========\n"+
"pass: A@v1\n"+
"err: B@v1 (255)\n",
) {
t.Fatalf("Unexpected log:\n%s\n", s)
}
}
})

Expand Down

0 comments on commit 3a4427b

Please sign in to comment.