Update to current version of Go library (revision 94d654be2064).

From-SVN: r171076
This commit is contained in:
Ian Lance Taylor 2011-03-16 23:05:44 +00:00
parent f617201f55
commit 5133f00ef8
293 changed files with 16312 additions and 4920 deletions

View file

@ -316,9 +316,9 @@ func TestNumSubexp(t *testing.T) {
}
func BenchmarkLiteral(b *testing.B) {
x := strings.Repeat("x", 50)
x := strings.Repeat("x", 50) + "y"
b.StopTimer()
re := MustCompile(x)
re := MustCompile("y")
b.StartTimer()
for i := 0; i < b.N; i++ {
if !re.MatchString(x) {
@ -329,9 +329,9 @@ func BenchmarkLiteral(b *testing.B) {
}
func BenchmarkNotLiteral(b *testing.B) {
x := strings.Repeat("x", 49)
x := strings.Repeat("x", 50) + "y"
b.StopTimer()
re := MustCompile("^" + x)
re := MustCompile(".y")
b.StartTimer()
for i := 0; i < b.N; i++ {
if !re.MatchString(x) {