* gcc-interface/decl.c (warn_on_field_placement): Issue the warning
[official-gcc.git] / libgo / go / bufio / export_test.go
blob3d3bb27d8da51b72e343579b1e54b115b3becb9a
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 func (s *Scanner) MaxTokenSize(n int) {
15 if n < utf8.UTFMax || n > 1e9 {
16 panic("bad max token size")
18 if n < len(s.buf) {
19 s.buf = make([]byte, n)
21 s.maxTokenSize = n
24 // ErrOrEOF is like Err, but returns EOF. Used to test a corner case.
25 func (s *Scanner) ErrOrEOF() error {
26 return s.err