romance

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunFindRegionsTest

func RunFindRegionsTest(t *testing.T, f func(*snowballword.Word) (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.Word, f isVowelFunc, start int) int

Types

type FindRegionsTestCase

type FindRegionsTestCase struct {
	Word    string
	R1start int
	R2start int
	RVstart int
}

type StepTestCase

type StepTestCase struct {
	WordIn     string
	R1start    int
	R2start    int
	RVstart    int
	Changed    bool
	WordOut    string
	R1startOut int
	R2startOut int
	RVstartOut int
}

type WordBoolTestCase

type WordBoolTestCase struct {
	Word   string
	Result bool
}

Test case for functions that take a word and return a bool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL