Replace += 1 with ++

This commit is contained in:
Joël Stemmer 2022-08-11 00:49:39 +01:00
parent fbfb33add1
commit ddf6b16828
2 changed files with 5 additions and 5 deletions

View File

@ -74,18 +74,18 @@ func (t *Testsuite) AddProperty(name, value string) {
// AddTestcase adds Testcase tc to this Testsuite. // AddTestcase adds Testcase tc to this Testsuite.
func (t *Testsuite) AddTestcase(tc Testcase) { func (t *Testsuite) AddTestcase(tc Testcase) {
t.Testcases = append(t.Testcases, tc) t.Testcases = append(t.Testcases, tc)
t.Tests += 1 t.Tests++
if tc.Error != nil { if tc.Error != nil {
t.Errors += 1 t.Errors++
} }
if tc.Failure != nil { if tc.Failure != nil {
t.Failures += 1 t.Failures++
} }
if tc.Skipped != nil { if tc.Skipped != nil {
t.Skipped += 1 t.Skipped++
} }
} }

View File

@ -53,7 +53,7 @@ func newReportBuilder() *reportBuilder {
func (b *reportBuilder) newID() int { func (b *reportBuilder) newID() int {
id := b.nextID id := b.nextID
b.lastID = id b.lastID = id
b.nextID += 1 b.nextID++
return id return id
} }