Enable common extensions for benchmark

Also, reset the timer after loading test data.
This commit is contained in:
Vytautas Šaltenis 2016-07-30 21:40:13 +03:00
parent c61b63f42c
commit 3fe4ad2966
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,7 @@ func TestReference_EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK(t *testing.T) {
var benchResultAnchor string
func BenchmarkReference(b *testing.B) {
params := TestParams{Options: Options{Extensions: NoExtensions}}
params := TestParams{Options: Options{Extensions: CommonExtensions}}
files := []string{
"Amps and angle encoding",
"Auto links",
@ -115,6 +115,7 @@ func BenchmarkReference(b *testing.B) {
}
tests = append(tests, string(inputBytes))
}
b.ResetTimer()
for n := 0; n < b.N; n++ {
for _, test := range tests {
benchResultAnchor = runMarkdown(test, params)