Skip to content

Commit

Permalink
fix BenchmarkParseNumber ... it never worked :(
Browse files Browse the repository at this point in the history
  • Loading branch information
davecheney committed Nov 1, 2023
1 parent 3009e19 commit 00534bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ func BenchmarkParseNumber(b *testing.B) {
r: r,
},
}
scanner.br.extend()
n := scanner.parseNumber(scanner.br.window(0)[0])
if n != len(tc) {
b.Fatalf("failed")
b.Fatalf("expected: %v, got: %v", len(tc), n)
}
}
})
Expand Down

0 comments on commit 00534bc

Please sign in to comment.