Skip to content

Commit

Permalink
Merge pull request #44 from dnephin/fix-use-of-iota
Browse files Browse the repository at this point in the history
Fix summary iota
  • Loading branch information
dnephin committed Feb 17, 2019
2 parents cec68c0 + c96a20a commit 308fb9a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func TestNoSummaryValue_SetAndString(t *testing.T) {
t.Run("none", func(t *testing.T) {
assert.Equal(t, newNoSummaryValue().String(), "")
assert.Equal(t, newNoSummaryValue().String(), "none")
})
t.Run("one", func(t *testing.T) {
value := newNoSummaryValue()
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions testjson/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type Summary int

// nolint: golint
const (
SummarizeNone Summary = 1 << (iota * 2)
SummarizeSkipped
SummarizeNone Summary = 0
SummarizeSkipped Summary = (1 << iota) / 2
SummarizeFailed
SummarizeErrors
SummarizeOutput
Expand Down Expand Up @@ -45,7 +45,7 @@ func (s Summary) String() string {
return "none"
}
var result []string
for v := SummarizeNone; v <= s; v = v << 1 {
for v := Summary(1); v <= s; v = v << 1 {
if s.Includes(v) {
result = append(result, summaryValues[v])
}
Expand Down

0 comments on commit 308fb9a

Please sign in to comment.