mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
step 2 of the great buffer shift.
make strings.Buffer handle strings and bytes with comparable efficiency. if ok, next step will be to move this code to bytes.Buffer and terminate strings.Buffer's short happy life. R=rsc DELTA=292 (212 added, 0 deleted, 80 changed) OCL=34837 CL=34849
This commit is contained in:
parent
de0d762a0f
commit
fed4770685
5 changed files with 283 additions and 71 deletions
|
|
@ -228,7 +228,7 @@ func TestWrongTypeDecoder(t *testing.T) {
|
|||
}
|
||||
|
||||
func corruptDataCheck(s string, err os.Error, t *testing.T) {
|
||||
b := strings.NewBuffer(s);
|
||||
b := strings.NewBufferString(s);
|
||||
dec := NewDecoder(b);
|
||||
dec.Decode(new(ET2));
|
||||
if dec.state.err != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue