libgo: Update to October 24 version of master library.

From-SVN: r204466
This commit is contained in:
Ian Lance Taylor 2013-11-06 19:49:01 +00:00
parent f20f261304
commit f038dae646
596 changed files with 32029 additions and 7466 deletions

View file

@ -9,7 +9,6 @@ import (
"compress/bzip2"
"fmt"
"io"
"math/rand"
"os"
"path/filepath"
"regexp/syntax"
@ -67,13 +66,6 @@ func TestRE2Search(t *testing.T) {
testRE2(t, "testdata/re2-search.txt")
}
func TestRE2Exhaustive(t *testing.T) {
if testing.Short() {
t.Skip("skipping TestRE2Exhaustive during short test")
}
testRE2(t, "testdata/re2-exhaustive.txt.bz2")
}
func testRE2(t *testing.T, file string) {
f, err := os.Open(file)
if err != nil {
@ -650,11 +642,17 @@ func makeText(n int) []byte {
return text[:n]
}
text = make([]byte, n)
x := ^uint32(0)
for i := range text {
if rand.Intn(30) == 0 {
x += x
x ^= 1
if int32(x) < 0 {
x ^= 0x88888eef
}
if x%31 == 0 {
text[i] = '\n'
} else {
text[i] = byte(rand.Intn(0x7E+1-0x20) + 0x20)
text[i] = byte(x%(0x7E+1-0x20) + 0x20)
}
}
return text
@ -691,7 +689,7 @@ func BenchmarkMatchEasy1_1K(b *testing.B) { benchmark(b, easy1, 1<<10) }
func BenchmarkMatchEasy1_32K(b *testing.B) { benchmark(b, easy1, 32<<10) }
func BenchmarkMatchEasy1_1M(b *testing.B) { benchmark(b, easy1, 1<<20) }
func BenchmarkMatchEasy1_32M(b *testing.B) { benchmark(b, easy1, 32<<20) }
func BenchmarkMatchMedium_32(b *testing.B) { benchmark(b, medium, 1<<0) }
func BenchmarkMatchMedium_32(b *testing.B) { benchmark(b, medium, 32<<0) }
func BenchmarkMatchMedium_1K(b *testing.B) { benchmark(b, medium, 1<<10) }
func BenchmarkMatchMedium_32K(b *testing.B) { benchmark(b, medium, 32<<10) }
func BenchmarkMatchMedium_1M(b *testing.B) { benchmark(b, medium, 1<<20) }