c++: decltype of (by-value captured reference) [PR79620]
[official-gcc.git] / libgo / go / bufio / export_test.go
blob1667f01a841e07cba04c62e8cf7da7ab3593ca2b
1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package bufio
7 // Exported for testing only.
8 import (
9 "unicode/utf8"
12 var IsSpace = isSpace
14 const DefaultBufSize = defaultBufSize
16 func (s *Scanner) MaxTokenSize(n int) {
17 if n < utf8.UTFMax || n > 1e9 {
18 panic("bad max token size")
20 if n < len(s.buf) {
21 s.buf = make([]byte, n)
23 s.maxTokenSize = n
26 // ErrOrEOF is like Err, but returns EOF. Used to test a corner case.
27 func (s *Scanner) ErrOrEOF() error {
28 return s.err