File: easy_test.go

package info (click to toggle)
golang-github-jdkato-prose 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 12,904 kB
  • sloc: python: 115; makefile: 52; sh: 41
file content (23 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package summarize

import (
	"encoding/json"
	"path/filepath"
	"testing"

	"github.com/jdkato/prose/internal/util"
)

func BenchmarkEasyWordsLookupMap(b *testing.B) {
	cases := util.ReadDataFile(filepath.Join(testdata, "syllables.json"))
	tests := make(map[string]int)
	util.CheckError(json.Unmarshal(cases, &tests))

	for n := 0; n < b.N; n++ {
		for word := range tests {
			if _, ok := easyWords[word]; ok {

			}
		}
	}
}