Documentation ¶
Overview ¶
Package internal contains textproc internals.
Index ¶
- func CheckErrorChannel(t *testing.T, errCh <-chan error, want error)
- func CheckRuneChannel(t *testing.T, runeCh <-chan rune, content string)
- func CheckRuneProcessor(t *testing.T, processor textproc.RuneProcessor, ...)
- func CheckTokenChannel(t *testing.T, tokenCh <-chan []rune, strings []string)
- func CheckTokenizer(t *testing.T, tokenizer textproc.Tokenizer, testcases TokenizerTestCases)
- type RuneProcessorTestCases
- type TokenizerTestCases
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErrorChannel ¶
CheckErrorChannel checks that an error channel delivers an expected value and is then closed.
func CheckRuneChannel ¶
CheckRuneChannel checks the entire content of a rune channel.
func CheckRuneProcessor ¶
func CheckRuneProcessor(t *testing.T, processor textproc.RuneProcessor, testcases RuneProcessorTestCases)
CheckRuneProcessor checks the RuneProcessor on the test cases.
func CheckTokenChannel ¶
CheckTokenChannel checks the entire content of a token channel.
func CheckTokenizer ¶
func CheckTokenizer(t *testing.T, tokenizer textproc.Tokenizer, testcases TokenizerTestCases)
CheckTokenizer checks the Tokenizer on the test cases.
Types ¶
type RuneProcessorTestCases ¶
RuneProcessorTestCases maps input to corresponding output and error for a RuneProcessor.
type TokenizerTestCases ¶
TokenizerTestCases maps input to corresponding output and error for a Tokenizer.
Click to show internal directories.
Click to hide internal directories.