compiler, libgo: Permit testing package when test imports it circularly.
From-SVN: r195931
This commit is contained in:
parent
8e29a61c2d
commit
d54fc07473
16 changed files with 84 additions and 264 deletions
|
@ -2,11 +2,10 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package binary_test
|
||||
package binary
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
. "encoding/binary"
|
||||
"io"
|
||||
"testing"
|
||||
)
|
||||
|
@ -135,8 +134,8 @@ func testOverflow(t *testing.T, buf []byte, n0 int, err0 error) {
|
|||
}
|
||||
|
||||
func TestOverflow(t *testing.T) {
|
||||
testOverflow(t, []byte{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x2}, -10, Overflow)
|
||||
testOverflow(t, []byte{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x1, 0, 0}, -13, Overflow)
|
||||
testOverflow(t, []byte{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x2}, -10, overflow)
|
||||
testOverflow(t, []byte{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x1, 0, 0}, -13, overflow)
|
||||
}
|
||||
|
||||
func TestNonCanonicalZero(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue