Documentation ¶
Overview ¶
This file contains test runners that are common to the romance languages.
Index ¶
- func RunFindRegionsTest(t *testing.T, f func(*snowballword.SnowballWord) (int, int, int), ...)
- func RunRunewiseBoolTest(t *testing.T, f func(rune) bool, tcs []WordBoolTestCase)
- func RunStepTest(t *testing.T, f stepFunc, tcs []StepTestCase)
- func RunWordBoolTest(t *testing.T, f func(string) bool, tcs []WordBoolTestCase)
- func VnvSuffix(word *snowballword.SnowballWord, f isVowelFunc, start int) int
- type FindRegionsTestCase
- type StepTestCase
- type WordBoolTestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunFindRegionsTest ¶
func RunFindRegionsTest(t *testing.T, f func(*snowballword.SnowballWord) (int, int, int), tcs []FindRegionsTestCase)
Test isLowerVowel for things we know should be true or false.
func RunRunewiseBoolTest ¶
func RunRunewiseBoolTest(t *testing.T, f func(rune) bool, tcs []WordBoolTestCase)
Test runner for functions that should be fed each rune of a string and that return a bool for each rune. Usually used to test functions that return true if a rune is a vowel, etc.
func RunStepTest ¶
func RunStepTest(t *testing.T, f stepFunc, tcs []StepTestCase)
func RunWordBoolTest ¶
func RunWordBoolTest(t *testing.T, f func(string) bool, tcs []WordBoolTestCase)
Test runner for functions that take a word and return a bool.
func VnvSuffix ¶
func VnvSuffix(word *snowballword.SnowballWord, f isVowelFunc, start int) int
Finds the region after the first non-vowel following a vowel, or a the null region at the end of the word if there is no such non-vowel. Returns the index in the Word where the region starts; optionally skips the first `start` characters.
Types ¶
type FindRegionsTestCase ¶
type StepTestCase ¶
type WordBoolTestCase ¶
Test case for functions that take a word and return a bool.